json - Is there a data serialization language that allows objects to be used as the name for another object? -


i have found json , yaml both lacking.

i wish (in yaml):

nodes:   node: "name node":     - data     -      -     - node 

(in json):

{"nodes":    {"node":"name node": {      ["data","for","this","node"]     }} } 

but these both invalid in data serialization languages.

does know of data serialization language can use object name object, basically? think it's stupid can't in yaml, though forgive json since designed simple opposed being flexible.

actually, yaml can that. try complex-key syntax (see bottom of spec section 2.2)

nodes:   ? node: name node   : - data     -     -     - node 

that's map single key, used key. if perhaps after list key:

nodes:   ? - nodename1     - nodename2   : - data     -     -     - node 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -