Blender Git Commit Log
Git Commits -> Revision ddf97d6
Revision ddf97d6 by Jeroen Bakker (master) October 26, 2021, 11:09 (GMT) |
BlenLib: Add JSON Serialization/Deserialization Abstraction Layer. Adds an abstraction layer to switch between serialization formats. Currently only supports JSON. The abstraction layer supports `String`, `Int`, `Array`, `Null`, `Boolean`, `Float` and `Object`. This feature is only CPP complaint. To write from a stream, the structure can be built by creating a value (any subclass of `blender::io::serialize::Value` can do, and pass it to the `serialize` method of a `blender::io::serialize::Formatter`. The formatter is abstract and there is one implementation for JSON (`JsonFormatter`). To read from a stream use the `deserialize` method of the formatter. {D12693} uses this abstraction layer to read/write asset indexes. Reviewed By: Severin, sybren Maniphest Tasks: T91430 Differential Revision: https://developer.blender.org/D12544 |
Commit Details:
Full Hash: ddf97d6270d0a0da36257bb676d9d05513064de5
Parent Commit: d20fa6c
Lines Changed: +759, -0
3 Added Paths:
/source/blender/blenlib/BLI_serialize.hh (+330, -0) (View)
/source/blender/blenlib/intern/serialize.cc (+217, -0) (View)
/source/blender/blenlib/tests/BLI_serialize_test.cc (+208, -0) (View)
/source/blender/blenlib/intern/serialize.cc (+217, -0) (View)
/source/blender/blenlib/tests/BLI_serialize_test.cc (+208, -0) (View)
1 Modified Path:
/source/blender/blenlib/CMakeLists.txt (+4, -0) (Diff)