-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formal definition of CSON #38
Comments
Some other specification definition examples for other structured data: |
Another example: RFC7159 I'd suggest that there are two paths.
Of these, I think I prefer (1), but not by much. |
http://coffeescript.org/#objects_and_arrays Maybe this goes beyond just CSON, but CoffeeScript definition in general. |
Experience from JSON tends to indicate that divorcing CSON from coffee-script as soon as possible is going to allow much better interop between CSON implementations written in different languages. If coffee-script needs a more formal definition, that's an unrelated issue. The language at http://coffeescript.org/#objects_and_arrays is a good starting point, of course. |
Fixed in v2 - there is now cson-parser package |
Although I agree that splitting out the parser code into a separate module that doesn't re-use the coffee-script parser was fantastic work, I think you may be missing the point of the documentation request. Defining CSON as a wire-level protocol (where the "wire" might include a file, for example) is necessary if I want to write an implementation in a language that doesn't share ECMAscript's odd notion of Unicode (UTF-16 plus naked surrogates with escape sequences that might or might not generate valid Unicode when parsed?), have different notions of numbers (e.g. real 64-bit integers), has floating point types that work, etc. Saying "it's just coffee-script, and therefore just ECMAscript" doesn't make these questions go away. Am I allowed to include functions? Can I include function calls? What about using "import"? |
No dynamic abilities. They are for coffee files. CSON is now just a data format. Further discussion should happen over at https://github.com/groupon/cson-parser see #33 also |
JSON suffered from being too tied to the JavaScript programming language early on. I suggest a document describing the format being parsed, so that other interoperable implementations can be built.
If this exists already, than I suggest a link in the README. If it doesn't, I'd be willing to take a first stab at text.
The text was updated successfully, but these errors were encountered: