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

Unable to convert escaped JSON #5

Closed
tammomueller opened this issue Sep 23, 2014 · 1 comment
Closed

Unable to convert escaped JSON #5

tammomueller opened this issue Sep 23, 2014 · 1 comment
Labels

Comments

@tammomueller
Copy link

Great tool, however it appears that it is unable to parse escaped JSON correctly

Valid JSON
{ "test":"Test String", "escapedJson":"{\\"test\\":\\"test\\"}" }

@bemasher
Copy link
Owner

You've got two many escaping backslashes.

{ "test":"Test String", "escapedJson":"{\"test\":\"test\"}" }

Produces:

type _ struct {
    EscapedJson string `json:"escapedJson"`
    Test        string `json:"test"`
}

This is handled in the encoding/json package in the Go standard library, without requiring an external dependency, this behavior is outside of my control.

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

No branches or pull requests

2 participants