GoJay is a performant JSON encoder/decoder for Golang (currently the most performant, see benchmarks). It has a simple API and doesn't use reflection. It relies on small interfaces to decode/encode structures and slices. Gojay also comes with powerful stream decoding features and an even faster Unsafe API. There is also a code generation tool to make usage easier and faster. I looked at other fast decoders/encoders and realized it was mostly hardly readable static code generation or a lot of reflection had poor streaming features and were not so fast in the end. Also, I wanted to build a decoder that could consume an io.Reader of line or comma delimited JSON, in a JIT way. To consume a flow of JSON objects from a TCP connection for example or from a standard output. The same way I wanted to build an encoder that could encode a flow of data to a io.Writer.

Features

  • Decoding is done through two different API similar to standard encoding/json
  • Unmarshal API decodes a []byte to a given pointer with a single function
  • Decode API decodes a []byte to a given pointer by creating or borrowing a *gojay.Decoder with an io.Reader and calling Decode methods
  • All DecodeXxx methods are used to decode top level JSON values
  • NKeys method must return the number of keys to Unmarshal in the JSON object or 0. If zero is returned, all keys will be parsed
  • Encoding is done through two different API similar to standard encoding/json

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

MIT License

Follow GoJay

GoJay Web Site

Other Useful Business Software
Paessler: Easy to Use With Enterprise Power. Free Trial Icon
Paessler: Easy to Use With Enterprise Power. Free Trial

A low-code dashboard makes monitoring intuitive for any admin, while scripting and custom sensors give experts full control.

You shouldn't have to choose between a monitoring tool that's easy to use and one that's powerful enough for a complex environment. PRTG's low-code interface lets any admin build dashboards, set alerts and monitor devices without scripting, while custom sensors and full API access are there when your team needs deeper control. One platform, no compromise. Download a free 30-day trial now.
Get Free Download
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of GoJay!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Frameworks

Registered

2023-01-24