dzhibas / SublimePrettyJson

Prettify/Minify/Query/Goto/Validate/Lint JSON plugin for Sublime Text 3 & 4
MIT License
2.02k stars 181 forks source link

pretty json on sublime text 4 generates an invalid json object when formatting a minified json string #155

Closed ed-chang closed 2 years ago

ed-chang commented 3 years ago

minified json string to reproduce: {"abd":[{"abc":"abc","com":{"abc":"[{\"abc\":\"abc\",\"abc\":\"{\\\"abc\\\":{\\\"abc\\\":\\\"abcdef,xyz\\\"}}\",\"abc\":\"1\",\"abc\":\"abc\"}]","abcd":"efgh"}}]}

sublime text build: 4113

TerminalFi commented 3 years ago

Thanks! Investigating

TerminalFi commented 3 years ago

This doesn't appear to be happening to me in the latest release. Can you confirm?

ed-chang commented 3 years ago

Just tried again. My sublime text was upgraded from version 3. I've tried uninstalling and installing pretty json again but got the same result. image

ed-chang commented 3 years ago

I tried this and problem solved.. Thanks! cd Pretty JSON git checkout st3

vsethi13 commented 2 years ago

I am facing the same issue. ST Build# 4121 I don't want to bump down the version of pretty json package as @ed-chang did because I am afraid it might break something else. Screenshot 2021-11-16 at 4 25 03 PM

If I merge line#9 with line#8, it works!