json5 / json5-spec

The JSON5 Data Interchange Format
https://spec.json5.org
MIT License
49 stars 11 forks source link

Add datetime representation. #18

Closed prescod closed 3 years ago

prescod commented 4 years ago

This proposal tries to reflect the following design principles:

jordanbtucker commented 4 years ago

Thanks for the suggestions. As mentioned in https://github.com/json5/json5/issues/3 using string prefixes is not actually backward compatible with existing JSON5 documents in a literal sense. You have provided no metrics to show that there are no JSON5 documents with string prefixes.

Also, how would one write a JSON5 document that contains a string with a prefix? You have provided no mechanism to escape a prefix.

This also has the potential to open the door for more prefixes. Why only stop at Date prefixes? Why not RegExp, Map, Set, or UInt8Array prefixes?