Blender
V3.3
|
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< Value > | convert_from_json (const nlohmann::ordered_json &j) |
static std::unique_ptr< ArrayValue > | convert_from_json_to_array (const nlohmann::ordered_json &j) |
static std::unique_ptr< DictionaryValue > | convert_from_json_to_object (const nlohmann::ordered_json &j) |
using blender::io::serialize::ArrayValue = typedef ContainerValue<Vector<std::shared_ptr<Value> >, eValueType::Array> |
Definition at line 96 of file BLI_serialize.hh.
using blender::io::serialize::BooleanValue = typedef PrimitiveValue<bool, eValueType::Boolean> |
Definition at line 90 of file BLI_serialize.hh.
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.
using blender::io::serialize::DoubleValue = typedef PrimitiveValue<double, eValueType::Double> |
Definition at line 89 of file BLI_serialize.hh.
using blender::io::serialize::IntValue = typedef PrimitiveValue<int64_t, eValueType::Int> |
Definition at line 88 of file BLI_serialize.hh.
|
strong |
Enumeration containing all sub-classes of Value. It is used as for type checking.
Enumerator | |
---|---|
String | |
Int | |
Array | |
Null | |
Boolean | |
Double | |
Dictionary |
Definition at line 74 of file BLI_serialize.hh.
|
static |
Definition at line 152 of file serialize.cc.
References BLI_assert_unreachable, convert_from_json_to_array(), and convert_from_json_to_object().
Referenced by convert_from_json_to_array(), convert_from_json_to_object(), and blender::io::serialize::JsonFormatter::deserialize().
|
static |
Definition at line 126 of file serialize.cc.
References convert_from_json(), and element.
Referenced by convert_from_json().
|
static |
Definition at line 138 of file serialize.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_as(), convert_from_json(), and element.
Referenced by convert_from_json().
|
static |
Definition at line 58 of file serialize.cc.
References convert_to_json(), and blender::io::serialize::ContainerValue< Container, V, ContainerItem >::elements().
|
static |
Definition at line 71 of file serialize.cc.
References attribute, convert_to_json(), and blender::io::serialize::ContainerValue< Container, V, ContainerItem >::elements().
|
static |
Definition at line 84 of file serialize.cc.
References Array, blender::io::serialize::Value::as_array_value(), blender::io::serialize::Value::as_boolean_value(), blender::io::serialize::Value::as_dictionary_value(), blender::io::serialize::Value::as_double_value(), blender::io::serialize::Value::as_int_value(), blender::io::serialize::Value::as_string_value(), Boolean, Dictionary, Double, Int, Null, String, blender::io::serialize::Value::type(), blender::io::serialize::PrimitiveValue< T, V >::value(), and blender::io::serialize::StringValue::value().
Referenced by convert_to_json(), and blender::io::serialize::JsonFormatter::serialize().