netheril96 / StaticJSON

Fast, direct and static typed parsing of JSON with C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

question

gggin opened this issue · comments

commented

Can I have a rapidjson::Document in Person(my own define class)

Person.hpp

Persion p;

p.tree is a std::shared_ptrrapidjson::Document or std::unique_ptrrapidjson::Document?
or p.tree is a std::shared_ptrrapidjson::Value

Thanks!

You probably can use std::unique_ptr<rapidjson::Document>, but it only works if that node is a valid JSON document, that is, an array or object. rapidjson::Value is not supported for now, but it should not be hard to add.

commented

so good! tks!