Skip to content

How to get data into vector of user-defined type from a Json object #1493

Description

@Haris3243

Anyone here who can help me on urgent basis,i shall be very very thankful to him/her, I am in a big trouble due to this kindly help me
i want to store "Configurations" data into vector result.
where

class myclass{
string name;
string def;
string type;
string validation;
};

and my Json data is in nlohmann::Json object "Jdata" is as follows

{
    "Configuration":[
                                 {
	                               "Name":"FirstName",
	                               "Def":"DB('F_NAME')",
	                               "Type":"String",
	                               "Validation":""
                                 },
                                {
	                              "Name":"Age",
	                              "Def":"RANGE(MIN,MAX)",
                                      "Type":"Integar",
	                              "Validation":""
                                 },
                                {
	                              "Name":"DAY",
	                              "Def":"ENUM('MON','TUE','WED','THU','FRI','SAT','SUN')",
	                              "Type":"String",
	                              "Validation":"" 
                                }

                            ],
	"Input Configuration":[{"Name":"Fields"},{"Name":"Options"}]
}

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