Top 4.8% dependent repos on proxy.golang.org
proxy.golang.org : github.com/twmb/chkjson
Package chkjson provides the fastest JSON validating, compacting, and escaping functions that exist for Go. The standard library allocates when validating JSON and allocates more if the JSON is very nested. This library avoids allocating by using recursive parsing, which only adds just over 2x memory overhead. Other minor to major differences allow this library's Valid to over 2x faster as encoding/json's. The standard library ensures that compact JSON is JavaScript safe. This is necessary if the JSON will ever end up in JSONP, but is not always necessary. This library provides a faster AppendCompactJSONP function to imitate the stdlib's Compact, and further provides AppendCompact for the same speed with a no-allocation (no JSONP escaping) guarantee. This library's AppendCompact is usually around 3x-4x faster than encoding/json's Compact. For compacting JSON in place with no regard to JSONP, this library provides a direct Compact function that is faster and more intuitive than using AppendCompact to compact in place. In essence, this library aims to provide faster and allocation free alternatives to encoding/json for a few specific use cases. For use cases and design considerations, visit this project's repo's README.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/twmb/chkjson
License: MIT
Latest release: about 6 years ago
First release: over 6 years ago
Namespace: github.com/twmb
Dependent repositories: 1
Stars: 8 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 6 days ago