Closed xdlbdy closed 1 year ago
The JSON is like {"key-1": "value"}, and my code is p, err := jp.ParseString("$.key-1"), then the err is not nil
{"key-1": "value"}
p, err := jp.ParseString("$.key-1")
That is expected behaviour. The - character is not a valid unquoted token since it can be confused with the subtraction operation in filters. You should use the bracket notation instead ['key-1'].
-
['key-1']
The JSON is like
{"key-1": "value"}
, and my code isp, err := jp.ParseString("$.key-1")
, then the err is not nil