proximax-storage / cpp-xpx-chain-sdk

ProximaX Sirius-Chain C++ SDK
Apache License 2.0
2 stars 1 forks source link

Implement wrapper for raw Json object for json::Parser #4

Closed pananton closed 5 years ago

pananton commented 5 years ago

Some json docs returned by catapult API can contain arrays of other json objects of variable types. To parse them with json::Parser we first need to read all of them as simple strings containing json document, and then parse them individually. Described wrapper type will be used to hold raw json object data until it is parsed to correct variadic struct.

pananton commented 5 years ago

Decided to add a special field named "__data" to variadic structs which is handled by json parser instead of previous idea of using some wrapper type. This special field (when present) will be initialized with string containing corresponding json object.