by stickfigure · 4y ago · 0 comments
Tell me more about that. I'm not sure I grasp what it is telling about JSON?
"My programming language doesn't have timestamps" is not a real problem.
"Ten thousand stupid date formats which are all ambiguous with either numbers or strings" is an actual problem that people bang their heads into every day.
JSON self-describes booleans, numbers, strings, arrays, objects, and null. This is especially convenient when working with dynamic or ambiguous structures, and working in dynamically typed languages. Timestamp is sufficiently common and useful that it should be added to that list.
If you mean ".NET parser pattern matches strings and converts them dynamically" - that's the same horrible behavior yaml parsers have and it causes endless trouble. Imagine parsing titles of posts and some clever author makes a title that matches the timestamp format.
10-15 years later I'm still baffled by that early decision (and glad it's been fixed since then)
and that is important in realworld applications.