aldana wrote:
> i often see two different json styles to have names:
>
> { key : "value" }
>
> vs
>
> { "key" :"value" }
>
>
> looking at official sites only option 2 is correct syntax, never the less
> most of the tools do also handle option 1 and don't moan about the syntax.
>
> what you say, does it in practice not matter which option you choose?
>
> generally i favor option 1 because it is not polluted with the "". i wonder
> why this syntax wasn't official from the start....
>
> thanks 
>
> -----
> manuel aldana
> aldana((at))gmx.de
> software-engineering blog: http://www.aldana-online.de
>   
 Option 1 should be used if you are sure that all hash keys are regular 
javascript identifiers.

You can't write

{"my key and i love it" : "my value"}

with opt 1.

Since mixing these two approaches is ugly I guess that opt 2 is more 
general approach.

Best,
Mihailo

Reply via email to