Skip to content

Re-encode strings back, so result stays valid JSON #12

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

Closed
wants to merge 1 commit into from
Closed

Re-encode strings back, so result stays valid JSON #12

wants to merge 1 commit into from

Conversation

pashky
Copy link

@pashky pashky commented Dec 9, 2014

Otherwise any string containing quotes will break resulting JSON

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 6d00440 on pashky:master into a99387e on gongo:master.

@gongo
Copy link
Owner

gongo commented Dec 10, 2014

Hi @pashky Thanks to PR.

I have converted purposely.
Details: https://gist.github.com/gongo/1789605#comment-962402

If you want to use valid json after reformat, use json-pretty-print-buffer: https://github.com/gongo/json-reformat#important (From Emacs 24.4)

@gongo
Copy link
Owner

gongo commented Dec 10, 2014

@pashky
If you want merge this PR, Please modify test/json-reformat-test.el

@gongo
Copy link
Owner

gongo commented Dec 10, 2014

After merge this PR, I think I trying to create the following options:

(setq json-reformat:pretty-print-string t) ;; default nil

If t, result is old style (invalid json) .

@pashky pashky closed this Dec 10, 2014
gongo added a commit that referenced this pull request Dec 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants