tidwall / gjson

Get JSON values quickly - JSON parser for Go
MIT License
14.25k stars 848 forks source link

[Request] Data Mutation #245

Closed NolPixel closed 2 years ago

NolPixel commented 2 years ago

Is there any method for data mutation? if not can you make please. thanks!

Example:

obj := gjson.Parse(`{"a":0}`)
obj.Get("a").Val = 1

fmt.Print(obj.Get("a").Value()) // expected 1
tidwall commented 2 years ago

No, gjson is only for retrieving values. Check out the tidwall/sjson project, which shares the same syntax.

NolPixel commented 2 years ago

No, gjson is only for retrieving values. Check out the tidwall/sjson project, which shares the same syntax.

Wow thanks!