mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-08-16 02:28:57 +00:00
5686906583
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
26 lines
1.1 KiB
C++
26 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
#include <boost/json.hpp>
|
|
|
|
class json_t {
|
|
protected:
|
|
[[nodiscard]] static const boost::json::value& get_value(const boost::json::object& object, std::string key);
|
|
|
|
[[nodiscard]] static int64_t get_int64(const boost::json::value& value);
|
|
[[nodiscard]] static uint16_t get_uint16(const boost::json::value& value);
|
|
[[nodiscard]] static uint8_t get_uint8(const boost::json::value& value);
|
|
|
|
[[nodiscard]] static int64_t get_int64(const boost::json::object& object, std::string key);
|
|
[[nodiscard]] static uint16_t get_uint16(const boost::json::object& object, std::string key);
|
|
[[nodiscard]] static uint8_t get_uint8(const boost::json::object& object, std::string key);
|
|
|
|
[[nodiscard]] static const boost::json::array& get_array(const boost::json::value& value);
|
|
[[nodiscard]] static const boost::json::array& get_array(const boost::json::object& object, std::string key);
|
|
|
|
[[nodiscard]] static const boost::json::string& get_string(const boost::json::value& value);
|
|
[[nodiscard]] static const boost::json::string& get_string(const boost::json::object& object, std::string key);
|
|
};
|