Open anewton1998 opened 8 years ago
IMO, if the JCR is:
[ 42, 42 ]
Then the only valid JSON is:
[ 42, 42 ]
However, if the JCR (old style) is:
[ : 42.0, : 42.0 ]
then the following JSON is valid against it:
[ 42, 42 ]
So if you take your JSON and say that's your JCR, then you will only be matching integers. But if you specify floats, integers are subsets thereof.
I'm good with that. We probably need to clarify that in the draft.
I agree, but a more serious question is this. Given the JCR [9007199254740993.0], does the JSON [9007199254740992.0] match it? These are the two smallest positive integers that are indistinguishable when represented as floats. What about versions without the "point zero"?
John, it's thorny issues like these that I'm glad you're contributing on. I would be happy to defer to you on this.
Also, if we did define an int64 (for example), would we represent that as a standard JSON number and say it's a requirement of a processor of this message format to handle it, or would we say that's bigger than what we'd normally expect a JSON processor to handle so we'll represent it as a string?
This was asked of me yesterday.
Given this JSON:
Does that match this JCR (using old colon syntax ):
or does it only match this JCR: