by xinau · 8y ago · 0 comments
One key can't have multiple values with different types. For example in json:
{ "name" :
{ "first" : "Bob",
"last" : "Smith"
}
}
How would you add a "alternative" key to the "first" value type. The only way i can think of is something like this. { "name" :
{ "first" : "Bob",
"first.alternative": "Robert",
"last" : "Smith"
}
}
or as @latk suggested, let "first" be an array, with it's first entry being the non alternatives. { "name" :
{ "first" : ["Bob", "Robert"],
"last" : "Smith"
}
}
I think this is by design. To quote @mojombo "simple configuration file that maps unambiguously to a hash table".But this is only a guess.
No comments yet.