On 7/12/11 4:43 PM, Bill Roome wrote:
> I just discovered an interesting problem with JSON strings. RFC 4627 says
> that a string must be enclosed on double quotes. Eg,
>
> { "pids": [ "Pid1" ]}
>
> However, the java JSON parser I downloaded from www.json.org --
> http://www.json.org/java/index.html -- is more permissive. It allows
> single quotes or even no quotes. So that parser accepts the following as
> equivalent to the above:
>
> { 'pids': [ 'Pid1' ]}
> { pids: [ Pid1 ]}
>
> This begs the question of whether the ALTO spec, and the interop tests,
> should require strict compliance to RFC 4627.
>
> For example, if only a few parsers are as permissive as the one I
> downloaded, then we should require strict compliance. On the other hand,
> if most parsers are that permissive, then it will be difficult to enforce
> compliance.
>
> Suggestions? Particularly from folks who've worked with other JSON
> libraries?I'd suggest to stick to 4627 strictly. The relaxed syntax is a superset of the strict one and parsers capable of digesting the former (e.g. JavaScript parsers) are also able to parse the latter, but the opposite is not necessarily true. -- Ciao, Enrico
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ alto mailing list [email protected] https://www.ietf.org/mailman/listinfo/alto
