Closed Lucareful closed 8 months ago
You have to escape the special characters. See the https://github.com/tidwall/gjson/blob/master/SYNTAX.md#escape-character section of the documentation.
On Fri, Mar 8, 2024, 10:01 Lucareful @.***> wrote:
Problem
str :=
{"code":200,"msg":"","data":{"www.test.com":["hello world"]}}
I want to get ["hello world"], if i use gjson.Get(str, "data.www.test.com "), it dont work,beacuese . is path,how can i get result ["hello world"]
Greatful!
— Reply to this email directly, view it on GitHub https://github.com/tidwall/gjson/issues/352, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABURVOMDDDER35XR3I6F5OLYXF5AFAVCNFSM6AAAAABEMOSFH6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3TKNJYHEYTMMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
You have to escape the special characters. See the https://github.com/tidwall/gjson/blob/master/SYNTAX.md#escape-character section of the documentation. … On Fri, Mar 8, 2024, 10:01 Lucareful @.> wrote: Problem str :=
{"code":200,"msg":"","data":{"[www.test.com":["hello](http://www.test.com":["hello) world"]}}
I want to get ["hello world"], if i use gjson.Get(str, "data.www.test.com "), it dont work,beacuese . is path,how can i get result ["hello world"] Greatful! — Reply to this email directly, view it on GitHub <#352>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABURVOMDDDER35XR3I6F5OLYXF5AFAVCNFSM6AAAAABEMOSFH6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3TKNJYHEYTMMQ . You are receiving this because you are subscribed to this thread.Message ID: @.>
thanks !
Problem
I want to get
["hello world"]
, if i usegjson.Get(str, "data.www.test.com")
, it dont work,beacuese.
is path,how can i get result["hello world"]
Greatful!