Skip to content

[Nested Json Objects] Segmentation fault #1753

@yiakwy

Description

@yiakwy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions