Do JSON strings (digits only) need to be quoted? -
is acceptable json objects omit quotes strings contain digits only? example, instead of {"name":"0"} should parsers take care of {"name":0}?
we have in-house parser fails if string values not quoted. however, we've tested above 3rd party parser has no problem parsing {"name":0} , returning value string - i.e. "0".
i'm not sure if should insist senders of json packets always quote string values or should modify parser take both quoted , non-quoted ones.
i'd appreciate pointers 'official' docs.
the official json spec says numbers unquoted. if it's quoted, it's not number, it's string. e.g. "0" string, not number.
Comments
Post a Comment