Hacker News new | ask | show | jobs
by tomchristie 4109 days ago
> I-JSON doesn't appear to solve this problem

It's not within the scope of what I-JSON is intended to address. This is a more formally specified and slightly more constrained variation of the existing JSON spec. Adding new datatypes would mean that it would no longer be JSON.

1 comments

I'll agree there aren't many ways this could be solved without breaking compatibility with JSON. Certainly something like {"created": Date("2013-12-1T12:00:00Z")} a la BSON seems elegant but is incompatible with JSON.

Maybe something like "String values that match (some computationally inexpensive ISO-8601-matching regex) shall be converted to Date instances by the JSON parser" could be possible without huge compatibility issues.

I guess I was mostly using this topic to voice what I'd imagine is a common point of frustration in an otherwise great data interchange format.

No, definitely don't do that. You're just trading one set of small annoyances for a huge set of unpredictable problems.