JasF / json-simple

Automatically exported from code.google.com/p/json-simple
Apache License 2.0
0 stars 0 forks source link

failure to handle commants in JSON... #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create String s = "/* a comment */ { "name":"value" }
2. try using this string in the parser.
3. watch the parser fail.

What is the expected output? What do you see instead?
{ "name":"value" }

What version of the product are you using? On what operating system?
Windows OS

Please provide any additional information below.

Original issue reported on code.google.com by james.mo...@gmail.com on 9 Sep 2009 at 6:21

GoogleCodeExporter commented 9 years ago
http://www.json.org/json.r

       0.0.6 20-Apr-2008 {
            Cleanup and adjustment for changes in the spec. I've left the
            comment support in place for now, though Doug Crockford says
            there are no comments in JSON.

            Checked against the test suite from JSON.org. Test #18 should
            fail, but doesn't. It's a depth limit not enforced here.
        }
        0.0.7 21-Apr-2008 {
            Doug Crockford is confident that comments will not be re-added
            to the JSON spec, so all comment support has been removed.
            The comment rules also handled whitespace, so there have been a
            number of rule changes due to that.
        } Gregg

Original comment by karl.wet...@gmail.com on 10 Sep 2009 at 12:16

GoogleCodeExporter commented 9 years ago
Comments are not part of JSON spec. Set status to "Invalid".

Thanks.

Original comment by fangyid...@gmail.com on 10 Sep 2009 at 2:38