It does not require you to know the structure of the payload (eg. create structs), and allows accessing fields by providing the path to them. It is up to 10 times faster than standard encoding/json package (depending on payload size and usage), allocates no memory. Originally made for a project that relies on a lot of 3rd party APIs that can be unpredictable and complex. Encoding/json requires you to know exactly your data structures, or if you prefer to use map[string]interface{} instead, it will be very slow and hard to manage. I investigated what's on the market and found that most libraries are just wrappers around encoding/json, there is few options with own parsers (ffjson, easyjson), but they still require you to create data structures. The goal of this project is to push JSON parser to the performance limits and not sacrifice with compliance and developer user experience.
Features
- Library API is really simple
- You just need the Get method to perform any operatio
- Receives data structure, and key path to extract value from
- Accepts multiple keys to specify path to JSON value
- If no keys are provided it will try to extract the closest JSON value
- Useful for reading streams or arrays