ohler55 / ojg

Optimized JSON for Go
MIT License
837 stars 50 forks source link

Quote empty strings in JSON Paths #130

Closed paulo-raca closed 1 year ago

paulo-raca commented 1 year ago

Fixing a small corner case for child with empty name

Without this, jp.R().Child("").Child("a").String() results in $..a, which is a recursive descent.

Instead it should return $[''].a

ohler55 commented 1 year ago

Good catch.