federomero / pretty-json

Atom plugin. Format JSON documents.
MIT License
93 stars 23 forks source link

SyntaxError: Unexpected " #54

Closed jaiment closed 8 years ago

jaiment commented 8 years ago

Hello. I have Atom 1.9.0 and just installed this package and I get this message on my JSON, which I validated using jsonlint.com and Power JSON for Mac. 2016-08-01_14-36-42

https://gist.github.com/jaiment/33228e7c918ab6eb0993d68f5cdd0d03

lexicalunit commented 8 years ago

The gist you posted is 404. If you can I'd like to get my hands on that JSON so I can do some testing and try to work out a solution. Can you post it here or try gist again?

Edit: Ah, I see. The text of the link is correct but for some reason the hyperlink is set to "https://github.com/federomero/pretty-json/issues/url". I've got the JSON. Testing now.

lexicalunit commented 8 years ago

@jaiment, the Prettify command worked for me on the JSON in your posted gist. This is the output I got: https://gist.github.com/lexicalunit/54fc59274ee8ec6a68e7868ddcadd7a0 Can you make sure that you don't have any text selected when you run the command? By design, pretty-json will run on selected text if there is any instead of the entire file. Maybe that's what's going on here?

Also are you running pretty-json version 1.4.4?

jaiment commented 8 years ago

Sure, JSON is attached. :)

On Mon, Aug 1, 2016 at 4:20 PM, Amy Troschinetz notifications@github.com wrote:

The gist you posted is 404. If you can I'd like to get my hands on that JSON so I can do some testing and try to work out a solution. Can you post it here or try gist again?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/federomero/pretty-json/issues/54#issuecomment-236711322, or mute the thread https://github.com/notifications/unsubscribe-auth/AGBX7P9ieZkjjIz9vEmdhD24QJP57itGks5qbmMKgaJpZM4JZ7JC .

jaiment commented 8 years ago

Wow suddenly it worked, probably my mistake on the way of using prettify command, sorry.

lexicalunit commented 8 years ago

All good! Thanks for the bug report and for using the package :)

jaiment commented 8 years ago

I found that the error message appears when the JSON file is auto-generated from a Macro Excel using .NET .... Nice to find the reason ... here you may find the orinal JSON.

On Mon, Aug 1, 2016 at 4:36 PM, Amy Troschinetz notifications@github.com wrote:

All good! Thanks for the bug report and for using the package :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/federomero/pretty-json/issues/54#issuecomment-236715677, or mute the thread https://github.com/notifications/unsubscribe-auth/AGBX7MkdZzwn2I0PU-B2o2g25f4l2TKrks5qbmblgaJpZM4JZ7JC .