JSON document wrapper around a root RADJsonValue.
More...
#include <RADCore.h>
JSON document wrapper around a root RADJsonValue.
◆ RADJsonDocument() [1/2]
| RADCore::RADJsonDocument::RADJsonDocument |
( |
| ) |
|
Creates a document with null root.
◆ RADJsonDocument() [2/2]
| RADCore::RADJsonDocument::RADJsonDocument |
( |
RADJsonValue |
root | ) |
|
|
explicit |
Creates a document from root.
◆ fromFile()
| static std::optional<RADJsonDocument> RADCore::RADJsonDocument::fromFile |
( |
const std::string & |
path, |
|
|
std::string * |
error = nullptr |
|
) |
| |
|
static |
Loads and parses JSON from path.
◆ fromJson()
| static std::optional<RADJsonDocument> RADCore::RADJsonDocument::fromJson |
( |
const std::string & |
json, |
|
|
std::string * |
error = nullptr |
|
) |
| |
|
static |
◆ root() [1/2]
Returns mutable root value.
◆ root() [2/2]
| const RADJsonValue& RADCore::RADJsonDocument::root |
( |
| ) |
const |
Returns const root value.
◆ toFile()
| bool RADCore::RADJsonDocument::toFile |
( |
const std::string & |
path, |
|
|
bool |
pretty = true, |
|
|
std::string * |
error = nullptr |
|
) |
| const |
◆ toJson()
| std::string RADCore::RADJsonDocument::toJson |
( |
bool |
pretty = false | ) |
const |
The documentation for this class was generated from the following file:
- /media/jvincent/Kingspec512/repos/RADLib/RADCore/headers/RADCore.h