8000 fix: fix a bug for escaping 0xE2 0x80 0xA8 in compactString by lizixing · Pull Request #479 · goccy/go-json · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: fix a bug for escaping 0xE2 0x80 0xA8 in compactString #479

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

Merged
merged 1 commit into from
May 9, 2024

Conversation

lizixing
Copy link
Contributor
@lizixing lizixing commented Oct 30, 2023

the code below will panic

	v := struct {
		Type  string          `json:"type"`
		Value json.RawMessage `json:"value"`
	}{
		Type:  "pure",
		Value: json.RawMessage{0x22, 0x2e, 0xe2, 0x80, 0xa8, 0x22},
	}
	b, err := json.Marshal(&v)
	fmt.Printf("b: %s, err: %v\n", string(b), err)

@alexey-slivkin
Copy link

this PR should also fix the bug from #507

Copy link
Owner
@goccy goccy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your great PR ! LGTM 👍

@goccy goccy merged commit c352e8f into goccy:master May 9, 2024
@ashavitt-zafran
Copy link

Can you release a new version please?