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

is it a bug for parsing whitespace string? #47

Closed
1046102779 opened this issue Jun 8, 2017 · 2 comments
Closed

is it a bug for parsing whitespace string? #47

1046102779 opened this issue Jun 8, 2017 · 2 comments

Comments

@1046102779
Copy link
Contributor

image

@1046102779 1046102779 changed the title is it a bug about parsing whitespace string? is it a bug for parsing whitespace string? Jun 8, 2017
@Kisesy
Copy link
Contributor

Kisesy commented Jun 8, 2017

func main() {
	str := ` "s" `
	iter := jsoniter.ParseString(str)
	fmt.Println(iter.ReadString())
	fmt.Println(iter.Error == nil)
}
// s
// true

@taowen
Copy link
Contributor

taowen commented Jun 8, 2017

this is not a bug. If input is not string, ReadString() will produce a error in the field of iter.Error.

@taowen taowen closed this as completed Jun 12, 2017
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

No branches or pull requests

3 participants