Loading ...
Sorry, an error occurred while loading the content.

1622Re: [json] Do numeric values need to be double quoted when returned in objects?

Expand Messages
  • John Cowan
    Mar 11, 2011
    • 0 Attachment
      toddkingham scripsit:
      > Just as the subject suggests... Do you need to double quote numeric
      > values to be valid JSON? JSONlint seems to validate the following
      > string just fine: {"age":35}

      So it should: strings are quoted, numbers are not.

      > I believe the part in the spec that says all STRINGS must be double
      > quoted doesn't apply to numeric values as they are not strings...yes?

      Right.

      --
      John Cowan cowan@... http://ccil.org/~cowan
      In computer science, we stand on each other's feet.
      --Brian K. Reid
    • Show all 4 messages in this topic