Blender  V3.3
Namespaces | Classes | Typedefs | Enumerations | Functions
blender::io::serialize Namespace Reference

Namespaces

 json
 

Classes

class  PrimitiveValue
 
class  ContainerValue
 
class  Value
 
class  NullValue
 
class  StringValue
 
class  DictionaryValue
 
class  Formatter
 
class  JsonFormatter
 

Typedefs

using IntValue = PrimitiveValue< int64_t, eValueType::Int >
 
using DoubleValue = PrimitiveValue< double, eValueType::Double >
 
using BooleanValue = PrimitiveValue< bool, eValueType::Boolean >
 
using ArrayValue = ContainerValue< Vector< std::shared_ptr< Value > >, eValueType::Array >
 
using DictionaryElementType = std::pair< std::string, std::shared_ptr< Value > >
 

Enumerations

enum class  eValueType {
  String , Int , Array , Null ,
  Boolean , Double , Dictionary
}
 

Functions

static void convert_to_json (nlohmann::ordered_json &j, const Value &value)
 
static void convert_to_json (nlohmann::ordered_json &j, const ArrayValue &value)
 
static void convert_to_json (nlohmann::ordered_json &j, const DictionaryValue &value)
 
static std::unique_ptr< Valueconvert_from_json (const nlohmann::ordered_json &j)
 
static std::unique_ptr< ArrayValueconvert_from_json_to_array (const nlohmann::ordered_json &j)
 
static std::unique_ptr< DictionaryValueconvert_from_json_to_object (const nlohmann::ordered_json &j)
 

Typedef Documentation

◆ ArrayValue

Definition at line 96 of file BLI_serialize.hh.

◆ BooleanValue

Definition at line 90 of file BLI_serialize.hh.

◆ DictionaryElementType

using blender::io::serialize::DictionaryElementType = typedef std::pair<std::string, std::shared_ptr<Value> >

Internal storage type for DictionaryValue.

The elements are stored as an key value pair. The value is a shared pointer so it can be shared when using DictionaryValue::create_lookup.

Definition at line 258 of file BLI_serialize.hh.

◆ DoubleValue

Definition at line 89 of file BLI_serialize.hh.

◆ IntValue

Definition at line 88 of file BLI_serialize.hh.

Enumeration Type Documentation

◆ eValueType

Enumeration containing all sub-classes of Value. It is used as for type checking.

See also
#Value::type()
Enumerator
String 
Int 
Array 
Null 
Boolean 
Double 
Dictionary 

Definition at line 74 of file BLI_serialize.hh.

Function Documentation

◆ convert_from_json()

static std::unique_ptr< Value > blender::io::serialize::convert_from_json ( const nlohmann::ordered_json &  j)
static

◆ convert_from_json_to_array()

static std::unique_ptr<ArrayValue> blender::io::serialize::convert_from_json_to_array ( const nlohmann::ordered_json &  j)
static

Definition at line 126 of file serialize.cc.

References convert_from_json(), and element.

Referenced by convert_from_json().

◆ convert_from_json_to_object()

static std::unique_ptr<DictionaryValue> blender::io::serialize::convert_from_json_to_object ( const nlohmann::ordered_json &  j)
static

◆ convert_to_json() [1/3]

static void blender::io::serialize::convert_to_json ( nlohmann::ordered_json &  j,
const ArrayValue value 
)
static

◆ convert_to_json() [2/3]

static void blender::io::serialize::convert_to_json ( nlohmann::ordered_json &  j,
const DictionaryValue value 
)
static

◆ convert_to_json() [3/3]

static void blender::io::serialize::convert_to_json ( nlohmann::ordered_json &  j,
const Value value 
)
static