Hi!
Your example
class JSONExample
{
public:
std::string text;
...
}
Serializes into {"JSONExample":{"text":"Hello JSON World"}}. Is it possible to serialize them into just
{"text":"Hello JSON World"} ? Suppose I need to serialize a vector of JSONExample instances, so after serialization I'd like to have:
[{"text":"Hello JSON World 1"}, {"text":"Hello JSON World 2"}]
Hi!
Your example
Serializes into
{"JSONExample":{"text":"Hello JSON World"}}. Is it possible to serialize them into just{"text":"Hello JSON World"}? Suppose I need to serialize a vector ofJSONExampleinstances, so after serialization I'd like to have:[{"text":"Hello JSON World 1"}, {"text":"Hello JSON World 2"}]