On Fri, 2015-05-15 at 14:45 -0600, David Sankel wrote:
> On 05/15/2015 11:47 AM, J (Jean-Claude Gervais) wrote:
> >
> > I have a Json::Value which contains an object like
> >
> > "SOMEOBJECT":{
> >
> > "OTHEROBJECT": {
> > "VAL1": "string value a",
> > "VAL2": 25,
> > "VAL3": 10,
> > "VAL4": "string value w",
> > "VAL5": 1,
> > "VAL6": "string value x"
> > }
> >
> > }
> >
> > Given the Json::Value, I know how to obtain the names of its internal
> > objects: getMemberNames
> >
> > But how can I obtain the name of the object itself (SOMEOBJECT) ?
>
> In JSON, objects don't have names.
>
> { ... } is an object
> "asdf":... is an entry within an object.
>
David, thank you for taking the time to reply.
I thought surely the object would know what its label is.
The code that obtained the Json::Value did it by asking for it by its
name, I assumed this bit of data would be copied.
Thanks
|