$darkmode
Go to the source code of this file.
Typedefs | |
| using | fable::JsonType = nlohmann::json::value_t |
Functions | |
| std::string | fable::to_string (JsonType) |
| template<typename InputType > | |
| Json | fable::parse_json (InputType &&input) |
Variables | |
| bool | fable::NLOHMANN_JSON_ALLOW_COMMENTS = PARSE_JSON_WITH_COMMENTS |
| bool | fable::NLOHMANN_JSON_USE_EXCEPTIONS = PARSE_JSON_USE_EXCEPTIONS |
This file provides the basic fable::Json type used to represent JSON data. For functions and other to_json functions, see files in the json/ directory.
| using fable::JsonType = typedef nlohmann::json::value_t |
The JsonType type maps to nlohmann::json::value_t.
This makes it easier to talk/write about operations that deal on the underlying type that is stored in a Json value.
| Json fable::parse_json | ( | InputType && | input | ) |
Return the result of Json::parse, with the options to use exceptions and allow comments as set in this library, from NLOHMANN_JSON_USE_EXCEPTIONS and NLOHMANN_JSON_ALLOW_COMMENTS.
See the documentation on each of these global variables for more details.
| std::string fable::to_string | ( | JsonType | type | ) |
Return a string representation of a JSON type.
The returned string is one of the following values:
null object array boolean float integer unsigned string unknown
| bool fable::NLOHMANN_JSON_ALLOW_COMMENTS = PARSE_JSON_WITH_COMMENTS |
When parsing JSON from fable, should comments be allowed or lead to an exception? Value is controlled by PARSE_JSON_WITH_COMMENTS define. Default value is true.
This does not automatically apply to use of Json::parse. Instead you should use the parse_json helper function defined in this file.
| bool fable::NLOHMANN_JSON_USE_EXCEPTIONS = PARSE_JSON_USE_EXCEPTIONS |
When parsing JSON from fable, should exceptions be used? Default value is set by PARSE_JSON_WITH_COMMENTS define.
This is here for completeness. The fable library will not work correctly if exceptions are disabled, so this should always be set to true.