Skip to content
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

No pretty-printing of an apparently very simple JSON file (file provided for testing purposes) #40

Closed
GoogleCodeExporter opened this issue Mar 13, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
Open the doesnotwork.json file (in attachment) in Firefox with JSONovich 
enabled.

What is the expected output? What do you see instead?
It should have been pretty-printed. Here, the content is not pretty-printed.

What version of the product are you using? On what operating system?
JSONovich v1.9.6.1 on Firefox v25 and MS Win v8.

Please provide any additional information below.
Compare with the works.json file (in attachment). It works. Thanks in advance!

Original issue reported on code.google.com by davidbou...@gmail.com on 11 Nov 2013 at 8:53

Attachments:

@GoogleCodeExporter
Copy link
Author

Unfortunately, doesnotwork.json is not valid JSON. There is a trailing comma in 
the "main" array which causes Firefox's built-in strict JSON parser to throw an 
"unexpected character" error (JSON is not JavaScript, where this would be 
allowed).

I had been meaning a long time ago to replace that parser with a more forgiving 
one that would also display those sorts of syntax errors nicely, but time was 
against me.

Original comment by W.Elwoo...@gmail.com on 11 Nov 2013 at 9:35

@GoogleCodeExporter
Copy link
Author

Thanks a lot for your quick feedback. As follow-up to your comment, I think 
that ensuring strict JSON conformance is a nice feature, not a bug, therefore 
you should keep using Firefox built-in parser, IMHO.

However, would it be possible to modify the current behavior, that is, 
JSONovich silently ignoring a file which is not strictly conforming to JSON 
standards? For example, JSONovich could simply produce as output the Firefox 
console error, instead. I think this would add a great feature: detecting 
syntax errors.

Thanks in advance for your attention.

Original comment by davidbou...@gmail.com on 12 Nov 2013 at 8:49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant