![]() |
FIMS
v0.10.0
|
#include <fims_json.hpp>
Public Member Functions | |
| JsonValue | Parse (const std::string &json) |
| void | WriteToFile (const std::string &filename, JsonValue jsonValue) |
| void | Show (JsonValue jsonValue) |
Static Public Member Functions | |
| static std::string | removeWhitespace (const std::string &input) |
| static std::string | PrettyFormatJSON (const std::string &json) |
| Formats a JSON string. | |
Parses JSON strings and generates JSON values.
| JsonValue fims::JsonParser::Parse | ( | const std::string & | json | ) |
Parse a JSON string and return the corresponding JSON value.
Parse a JSON string and return the corresponding JSON value.
| json | The JSON string to parse. |
|
inlinestatic |
Formats a JSON string.
| json |
|
inlinestatic |
Remove whitespace in JSON.
| void fims::JsonParser::Show | ( | JsonValue | jsonValue | ) |
Display a JSON value to the standard output.
Display a JSON value to the standard output.
| jsonValue | The JSON value to display. |
| void fims::JsonParser::WriteToFile | ( | const std::string & | filename, |
| JsonValue | jsonValue | ||
| ) |
Write a JSON value to a file.
Write a JSON value to an output file.
| filename | The name of the output file. |
| jsonValue | The JSON value to write. |
Call a private helper function to write JSON values recursively