tidwall / sjson

Set JSON values very quickly in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot replace when processing special character "₫"

JackTJC opened this issue · comments

here I have a price field to modify, and i wanna use both of Optimistic and ReplaceInPlace option because the path is very simple and i wanna a better performance, but the bellowing code doesn't works well

set, err := sjson.SetOptions(`{"test":"149.000₫"}`, "test", "255.000₫", &sjson.Options{
	Optimistic:     true,
	ReplaceInPlace: true,
})
fmt.Println(set) // output: {"test":"149.000₫"}, actually no change

above code change nothing in json and doesn't return the errNoChange