I have a series objects which implements "json toJson() {}"
json j
json pixels_json
j["camera"] = std::move(camera_->toJson())
j["pixels"] = std::move(pixels_json)
for (auto& pixel : pixels)
{
pixels_json.push_back(std::move(pixel->toJson()));
}
The snippet of codes raises a Segmentation fault. I doubt whether json implements JSON object parser correctly because a json parser should parse
- primitives: Number, Bool, Symbol, String, Function
- Array
- Json Object itself
Apparently, you cannot do it and the documentation does not event mention about it.
I have a series objects which implements "json toJson() {}"
The snippet of codes raises a Segmentation fault. I doubt whether
jsonimplements JSON object parser correctly because a json parser should parseApparently, you cannot do it and the documentation does not event mention about it.