Extends the Go runtime's json.Decoder enabling navigation of a stream of json tokens.
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
github.com/exponent-io/jsonpath
Decodes a JSON string using jsonpath decoder and prints the result.
package main
import (
"fmt"
"strings"
"github.com/exponent-io/jsonpath"
)
func main() {
data := `{"foo": {"bar": "baz"}}`
decoder := jsonpath.NewDecoder(strings.NewReader(data))
result, err := decoder.Decode()
if err != nil {
panic(err)
}
fmt.Printf("Decoded: %v\n", result)
}
Debug
Known footguns
No known footguns recorded.
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.