API Documentation
Static Public Member Functions | List of all members
nkExport::JsonExporter Class Referencefinal

Exporter to use Json formatted data. More...

Static Public Member Functions

static nkMemory::String exportObjectIntoString (Exportable *toExport)
 
static nkMemory::String exportTreeIntoString (Node *rootNode)
 
static ExporterLoadResult importIntoTree (nkMemory::StringView strVal)
 

Detailed Description

Exporter to use Json formatted data.

An exporter allowing to :

Member Function Documentation

◆ exportObjectIntoString()

static nkMemory::String nkExport::JsonExporter::exportObjectIntoString ( Exportable toExport)
static

Exports an object implementing the nkExport::Exportable interface into a json string.

Parameters
toExportThe object to export.
Returns
The object translated as a json string.
Remarks
The exporter will create a tree using the nkExport::Exportable::exportClassToTree() function, and export it.

◆ exportTreeIntoString()

static nkMemory::String nkExport::JsonExporter::exportTreeIntoString ( Node rootNode)
static

Exports an already available tree into a json string.

Parameters
rootNodeThe tree to export.
Returns
The tree translated as a json string.

◆ importIntoTree()

static ExporterLoadResult nkExport::JsonExporter::importIntoTree ( nkMemory::StringView  strVal)
static

Imports a json string into a readable tree.

Parameters
strValThe json string to parse.
Returns
The result of the parsing operation, with a valid tree pointer if the parsing went well, a filled error otherwise.

The documentation for this class was generated from the following file: