public

Inheritance Graph

graph BT
	JSON_Parser
	click JSON_Parser "classUtil_1_1JSON__Parser"

Description

JSON parser for converting JSON data to GenericAttibutes.

const std::string str = "{"
                        " \"1\":2 ,\n"
                        " \"foo\":\"bar\" ,"
                        " \"true\":false,"
                        " \"bar\":true,"
                        " \"a\":[1,02e10,3.0,-2.5,\"27\",\"a\\\"a\"] "
                        "}";
GenericAttribute * attr = JSON_Parser::parse(str);
if(attr != nullptr) {
    std::cout << attr->toJSON() << std::endl;
}

Public Static Functions

   
   
GenericAttribute * parse(const std::string & str)
Try to convert a JSON formatted string into a GenericAttribute .

Documentation

function
Util::JSON_Parser::parse

public static
     
     
GenericAttribute * parse( const std::string & str )

Try to convert a JSON formatted string into a GenericAttribute .

Defined in Util/JSON_Parser.h:39