Adobe Source Libraries  1.43
Classes | Functions
JSON Utilities

Classes

class  json_parser< T >
 A utility class that parses raw JSON data and uses a helper class to construct the desired representations of what is parsed. More...
 
class  json_generator< T, O >
 A utility class that uses a helper class to access a provided data structure and output well-formed JSON. More...
 
struct  asl_json_helper_t
 A utility class can be used with json_parser and json_generator to round trip JSON data through the common ASL data structures. More...
 

Functions

adobe::any_regular_t json_parse (const char *data)
 A utility routine that takes in raw JSON data and produces a representation of that data using the common ASL data structures. More...
 
template<typename O >
json_generate (const adobe::any_regular_t &x, O out)
 A utility routine that takes in an any_regular_t and produces from it a well-formed representation of the structure in JSON. More...
 

Detailed Description

Function Documentation

adobe::any_regular_t adobe::json_parse ( const char *  data)

A utility routine that takes in raw JSON data and produces a representation of that data using the common ASL data structures.

Parameters
dataraw JSON data.
Returns
Either a array_t or a dictionary_t representing the raw data parsed, wrapped in an any_regular_t.

Definition at line 86 of file json_helper.hpp.

O adobe::json_generate ( const adobe::any_regular_t &  x,
out 
)

A utility routine that takes in an any_regular_t and produces from it a well-formed representation of the structure in JSON.

Note
The only types that will be accepted during JSON generation are:
  • array_t (array)
  • dictionary_t (object)
  • std::string (string)
  • double (double or int)
  • bool (bool)
  • empty_t (null)
Parameters
xThe encapsulated structure. This root structure must be either an array_t or a dictionary_t.
outOutput iterator to which the representative JSON will be copied.
Returns
The output iterator passed in.

Definition at line 112 of file json_helper.hpp.