Lines Matching refs:JSON

9 std::string JSON::escape_string(std::string string) {  in escape_string()
43 JSON::JSON(StructureType type) noexcept : ptr(type == StructureType::object ? new nlohmann::ordered… in JSON() function in JSON
45 JSON::JSON(const std::string &string) : ptr(new nlohmann::ordered_json(nlohmann::ordered_json::pars… in JSON() function in JSON
47 JSON::JSON(const char *c_str) : ptr(new nlohmann::ordered_json(nlohmann::ordered_json::parse(c_str)… in JSON() function in JSON
49 JSON::JSON(std::istream &istream) : ptr(new nlohmann::ordered_json(nlohmann::ordered_json::parse(is… in JSON() function in JSON
51 JSON::JSON(const boost::filesystem::path &path) { in JSON() function in JSON
59 JSON::JSON(JSON &&other) noexcept : ptr(other.ptr), owner(other.owner) { in JSON() function in JSON
63 JSON &JSON::operator=(JSON &&other) noexcept { in operator =()
72 JSON::~JSON() { in ~JSON()
77 JSON JSON::make_owner(JSON &&other) noexcept { in make_owner()
78 auto owner = JSON(new nlohmann::ordered_json(std::move(*other.ptr))); in make_owner()
84 std::ostream &operator<<(std::ostream &os, const JSON &json) { in operator <<()
88 std::string JSON::to_string(int indent) const { in to_string()
92 void JSON::to_file(const boost::filesystem::path &path, int indent) const { in to_file()
101 void JSON::set(const std::string &key, std::string value) noexcept { in set()
105 void JSON::set(const std::string &key, const char *value) noexcept { in set()
109 void JSON::set(const std::string &key, long long value) noexcept { in set()
113 void JSON::set(const std::string &key, double value) noexcept { in set()
117 void JSON::set(const std::string &key, bool value) noexcept { in set()
121 void JSON::set(const std::string &key, JSON &&value) noexcept { in set()
126 void JSON::set(const std::string &key, const JSON &value) noexcept { in set()
130 void JSON::remove(const std::string &key) noexcept { in remove()
134 void JSON::emplace_back(JSON &&value) { in emplace_back()
139 boost::optional<JSON> JSON::child_optional(const std::string &key) const noexcept { in child_optional()
148 JSON JSON::child(const std::string &key) const { in child()
149 return JSON(&ptr->at(key)); in child()
152 boost::optional<std::vector<std::pair<std::string, JSON>>> JSON::children_optional(const std::strin… in children_optional()
161 std::vector<std::pair<std::string, JSON>> JSON::children_or_empty(const std::string &key) const noe… in children_or_empty()
170 std::vector<std::pair<std::string, JSON>> JSON::children(const std::string &key) const { in children()
171 return JSON(&ptr->at(key)).children(); in children()
174 boost::optional<std::vector<std::pair<std::string, JSON>>> JSON::children_optional() const noexcept… in children_optional()
183 std::vector<std::pair<std::string, JSON>> JSON::children_or_empty() const noexcept { in children_or_empty()
192 std::vector<std::pair<std::string, JSON>> JSON::children() const { in children()
195 std::vector<std::pair<std::string, JSON>> result; in children()
197 result.emplace_back(it.key(), JSON(&*it)); in children()
201 boost::optional<JSON> JSON::object_optional(const std::string &key) const noexcept { in object_optional()
210 JSON JSON::object(const std::string &key) const { in object()
211 return JSON(&ptr->at(key)).object(); in object()
215 boost::optional<JSON> JSON::object_optional() const noexcept { in object_optional()
224 JSON JSON::object() const { in object()
227 return JSON(ptr); in object()
230 boost::optional<std::vector<JSON>> JSON::array_optional(const std::string &key) const noexcept { in array_optional()
239 std::vector<JSON> JSON::array_or_empty(const std::string &key) const noexcept { in array_or_empty()
248 std::vector<JSON> JSON::array(const std::string &key) const { in array()
249 return JSON(&ptr->at(key)).array(); in array()
252 boost::optional<std::vector<JSON>> JSON::array_optional() const noexcept { in array_optional()
261 std::vector<JSON> JSON::array_or_empty() const noexcept { in array_or_empty()
270 std::vector<JSON> JSON::array() const { in array()
273 std::vector<JSON> result; in array()
280 boost::optional<std::string> JSON::string_optional(const std::string &key) const noexcept { in string_optional()
289 std::string JSON::string_or(const std::string &key, const std::string &default_value) const noexcep… in string_or()
298 std::string JSON::string(const std::string &key) const { in string()
302 boost::optional<std::string> JSON::string_optional() const noexcept { in string_optional()
311 std::string JSON::string_or(const std::string &default_value) const noexcept { in string_or()
320 std::string JSON::string() const { in string()
324 boost::optional<long long> JSON::integer_optional(const std::string &key, ParseOptions parse_option… in integer_optional()
333 long long JSON::integer_or(const std::string &key, long long default_value, ParseOptions parse_opti… in integer_or()
342 long long JSON::integer(const std::string &key, ParseOptions parse_options) const { in integer()
343 return JSON(&ptr->at(key)).integer(parse_options); in integer()
346 boost::optional<long long> JSON::integer_optional(ParseOptions parse_options) const noexcept { in integer_optional()
355 long long JSON::integer_or(long long default_value, ParseOptions parse_options) const noexcept { in integer_or()
364 long long JSON::integer(ParseOptions parse_options) const { in integer()
381 boost::optional<double> JSON::floating_point_optional(const std::string &key, ParseOptions parse_op… in floating_point_optional()
390 double JSON::floating_point_or(const std::string &key, double default_value, ParseOptions parse_opt… in floating_point_or()
399 double JSON::floating_point(const std::string &key, ParseOptions parse_options) const { in floating_point()
400 return JSON(&ptr->at(key)).floating_point(parse_options); in floating_point()
403 boost::optional<double> JSON::floating_point_optional(ParseOptions parse_options) const noexcept { in floating_point_optional()
412 double JSON::floating_point_or(double default_value, ParseOptions parse_options) const noexcept { in floating_point_or()
421 double JSON::floating_point(ParseOptions parse_options) const { in floating_point()
438 boost::optional<bool> JSON::boolean_optional(const std::string &key, ParseOptions parse_options) co… in boolean_optional()
447 bool JSON::boolean_or(const std::string &key, bool default_value, ParseOptions parse_options) const… in boolean_or()
456 bool JSON::boolean(const std::string &key, ParseOptions parse_options) const { in boolean()
457 return JSON(&ptr->at(key)).boolean(parse_options); in boolean()
460 boost::optional<bool> JSON::boolean_optional(ParseOptions parse_options) const noexcept { in boolean_optional()
469 bool JSON::boolean_or(bool default_value, ParseOptions parse_options) const noexcept { in boolean_or()
479 bool JSON::boolean(ParseOptions parse_options) const { in boolean()