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

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

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
14 checks passed
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.

None yet

3 participants