ion-docs
go-json
ion-docs | go-json | |
---|---|---|
4 | 24 | |
21 | 2,806 | |
- | - | |
4.1 | 3.2 | |
12 days ago | 3 days ago | |
Java | Go | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ion-docs
-
Rob Pike: Gobs of data (2011)
Have you tried the superset of json from AWS?
https://amazon-ion.github.io/ion-docs/
-
Introducing JXC: An extensible, expressive data language. It's a drop-in replacement for JSON and supports type annotations, numeric suffixes, base64 strings, and more!
How it compares to Amazon Ion?
-
Amazon Ion – a richly-typed, self-describing, hierarchical serialization format
Disclosure: I manage the Ion and PartiQL teams at Amazon.
If you want to create an issue for it (the best repo is probably the ion-docs one: https://github.com/amzn/ion-docs/issues) that will help to show us there is demand for it. Providing information on your use case helps us prioritize.
go-json
-
API: Go, .NET, Rust
For go -> you can actually get away with the standard json encoding package. Or if you want a slightly better one, I prefer goccy/go-json
-
Rob Pike: Gobs of data (2011)
Someone made a benchmark of serialization libraries in go [1], and I was surprised to see gobs is one of the slowest ones, specially for decoding. I suspect part of the reason is that the API doesn't not allow reusing decoders [2]. From my explorations it seems like both JSON [3], message-pack [4] and CBOR [5] are better alternatives.
By the way, in Go there are a like a million JSON encoders because a lot of things in the std library are not really coded for maximum performance but more for easy of usage, it seems. Perhaps this is the right balance for certain things (ex: the http library, see [6]).
There are also a bunch of libraries that allow you to modify a JSON file "in place", without having to fully deserialize into structs (ex: GJSON/SJSON [7] [8]). This sounds very convenient and more efficient that fully de/serializing if we just need to change the data a little.
--
1: https://github.com/alecthomas/go_serialization_benchmarks
2: https://github.com/golang/go/issues/29766#issuecomment-45492...
--
3: https://github.com/goccy/go-json
4: https://github.com/vmihailenco/msgpack
5: https://github.com/fxamacker/cbor
--
6: https://github.com/valyala/fasthttp#faq
--
7: https://github.com/tidwall/gjson
8: https://github.com/tidwall/sjson
-
Data storage speed comparisons?
Drop-in replacement for the stdlib JSON package: https://github.com/goccy/go-json
-
Go is 2-3 times slower than JS in a similar code. What makes Go slow in this specific code?
go stdlib json encoding/decoding is incredibly slow, not sure for how much longer because there are drop in replacements now that I think are just as strict and feature parity.
-
Go with Chi has more ram consumption and less req/s than Koa or Fastify
3rd party JSON libraries could help if you were comparing JSON. https://github.com/goccy/go-json
-
ogen: spec-first OpenAPI v3 codegen for Go
However, I understand the code that is generated is super optimized. For example, rather than use a router, it does a static code generated router. Rather than use goccy/go-json, it does manual marshalling.
-
japi is a JSON HTTP API go library with generics
Minimal dependencies: julienschmidt/httprouter and goccy/go-json
-
Using a json lib other than encoding/json
I suggested using https://github.com/goccy/go-json at my work, since its a drop in replacement for the standard lib, but there are people who apprehensive. In my opinion the performance gains are significant to justify adoption. But I'd like your input.
- Whats the fastest JSON unmarshaling package as of right now?
-
What are your favorite packages to use?
go-json for encoding/decoding
What are some alternatives?
Protobuf - Protocol Buffers - Google's data interchange format
jsoniter - A high-performance 100% compatible drop-in replacement of "encoding/json"
Cap'n Proto - Cap'n Proto serialization/RPC system - core tools and C++ library
easyjson - Fast JSON serializer for golang.
DeDRM_tools - DeDRM tools for ebooks
GJSON - Get JSON values quickly - JSON parser for Go
zish - A data serialization format
go-fuzz - Randomized testing for Go
cue - The home of the CUE language! Validate and define text-based and dynamic configuration
Gin - Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
binlog - A high performance C++ log library, producing structured binary logs
zap - Blazing fast, structured, leveled logging in Go.