-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Description
hi,
i am quite new in reading json file in c++.
So my file json file is
"Image_Details": {
"Image": {
"ImagePath": "/home/.../super.png",
"Filetype": ".jpg,.png",
"ImageResolution": {
"Obj_Height": 1000,
"Obj_Width": 800
},
"ImagePosition": {
"Pos-X-coordinates_start(Width)": 0,
"Pos-Y-coordinates_start(Height)": 0,
"Pos-z-coordinates_start": 0
}
}
}
in c++ my code is
superdata = nlohmann::json::parse(superDetails);
std::cout << std::setw(4) << superdata << "\n\n";
auto s2 = superdata["Image_Details"]["ImageResolution"]["Obj_Height"];
output of s2 is null.
how can read indivual value of my JSON file such as obj_width in ImageResolution object?
any idea how can read it or get the value ?
regards,
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels