millijson
Lightweight JSON parser for C++
Loading...
Searching...
No Matches
millijson::DefaultProvisioner Struct Reference

Default methods to provision representations of JSON types. More...

#include <millijson.hpp>

Public Types

typedef ::millijson::Base Base
 

Static Public Member Functions

static Booleannew_boolean (bool x)
 
static Numbernew_number (double x)
 
static NumberAsStringnew_number_as_string (std::string x)
 
static Stringnew_string (std::string x)
 
static Nothingnew_nothing ()
 
static Arraynew_array (std::vector< std::shared_ptr< Base > > x)
 
static Objectnew_object (std::unordered_map< std::string, std::shared_ptr< Base > > x)
 

Detailed Description

Default methods to provision representations of JSON types.

Member Typedef Documentation

◆ Base

Alias for the base class for all JSON representations. All classes returned by new_* methods should be derived from this class.

Member Function Documentation

◆ new_array()

static Array * millijson::DefaultProvisioner::new_array ( std::vector< std::shared_ptr< Base > > x)
inlinestatic
Parameters
xContents of the JSON array.
Returns
Pointer to a new JSON array instance.

◆ new_boolean()

static Boolean * millijson::DefaultProvisioner::new_boolean ( bool x)
inlinestatic
Parameters
xValue of the boolean.
Returns
Pointer to a new JSON boolean instance.

◆ new_nothing()

static Nothing * millijson::DefaultProvisioner::new_nothing ( )
inlinestatic
Returns
Pointer to a new JSON null instance.

◆ new_number()

static Number * millijson::DefaultProvisioner::new_number ( double x)
inlinestatic
Parameters
xValue of the number.
Returns
Pointer to a new JSON number instance.

◆ new_number_as_string()

static NumberAsString * millijson::DefaultProvisioner::new_number_as_string ( std::string x)
inlinestatic
Parameters
xValue of the number as a string.
Returns
Pointer to a new JSON number instance.

◆ new_object()

static Object * millijson::DefaultProvisioner::new_object ( std::unordered_map< std::string, std::shared_ptr< Base > > x)
inlinestatic
Parameters
xContents of the JSON object.
Returns
Pointer to a new JSON object instance.

◆ new_string()

static String * millijson::DefaultProvisioner::new_string ( std::string x)
inlinestatic
Parameters
xValue of the string.
Returns
Pointer to a new JSON string instance.

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