Skip to content

Get array of items without using vector #1890

Description

@shrikky

I have an array of objects. I want to parse it into an array directly.

Example I have an array of boxes in Json
"Boxes":[
{
"name" :" box1",
"area" : "45"
},
{
"name": "box2"
"area": "50"
}
]

I want to directly parse it into an array of objects say in Boxes* boxes

Is it possible to do something like
Json J
Boxes* boxes = j.at("Boxes").get_ptr<Boxes*>();

I am on Win 10, Visual Studio 2019

  • Describe which version of the library you are using (release version, develop branch).
    Version 3.7.3

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions