Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
libcargo-json

cargo Json interface More...

Functions

template<class Cargo >
void cargo::loadFromJsonString (const std::string &jsonString, Cargo &visitable)
 Fills the visitable with data stored in the json string. More...
 
template<class Cargo >
std::string cargo::saveToJsonString (const Cargo &visitable)
 Creates a string representation of the visitable in json format. More...
 
template<class Cargo >
void cargo::loadFromJsonFile (const std::string &filename, Cargo &visitable)
 Loads the visitable from a json file. More...
 
template<class Cargo >
void cargo::saveToJsonFile (const std::string &filename, const Cargo &visitable)
 Saves the visitable in a json file. More...
 

Detailed Description

cargo Json interface

Function Documentation

template<class Cargo >
void cargo::loadFromJsonFile ( const std::string &  filename,
Cargo &  visitable 
)

Loads the visitable from a json file.

Parameters
filenamepath to the file
visitablevisitable structure to load
template<class Cargo >
void cargo::loadFromJsonString ( const std::string &  jsonString,
Cargo &  visitable 
)

Fills the visitable with data stored in the json string.

Parameters
jsonStringdata in a json format
visitablevisitable structure to fill
template<class Cargo >
void cargo::saveToJsonFile ( const std::string &  filename,
const Cargo &  visitable 
)

Saves the visitable in a json file.

Parameters
filenamepath to the file
visitablevisitable structure to save
template<class Cargo >
std::string cargo::saveToJsonString ( const Cargo &  visitable)

Creates a string representation of the visitable in json format.

Parameters
visitablevisitable structure to convert