CBMC
Loading...
Searching...
No Matches
Functions
json.cpp File Reference
#include "json.h"
#include "structured_data.h"
#include <algorithm>
#include <ostream>
+ Include dependency graph for json.cpp:

Go to the source code of this file.

Functions

bool  operator== (const jsont &left, const jsont &right)
 
 
  Convert the structured_datat into an json object.
 

Function Documentation

◆  json_node()

jsont json_node ( const structured_data_entrytentry )

Definition at line 210 of file json.cpp.

◆  operator==()

bool operator== ( const jsontleft,
const jsontright 
)

Definition at line 169 of file json.cpp.

◆  to_json()

jsont to_json ( const structured_datatdata )

Convert the structured_datat into an json object.

For example, the structured data: structured_datat data{ {{labelt{{"my", "data"}}, structured_data_entryt::entry( {{labelt{{"my", "number"}}, structured_data_entryt::data_node(json_numbert("10"))}, {labelt{{"my", "string"}}, structured_data_entryt::data_node(json_stringt("hi"))}})}}};

Will produce:

{
"myData": {
"myNumber": 10
"myString": "hi"
}
}
Parameters
data The structured data to convert.
Returns
The json object as specified.

Definition at line 225 of file json.cpp.

AltStyle によって変換されたページ (->オリジナル) /