The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →
Top 23 Go JSON Projects
-
Project mention: Best practices for distributing and updating a Go CLI on Linux? | /r/golang | 2023-05-18
Can you use a framework like urfavecli https://github.com/urfave/cli? This will auto-update every time it detects a new version from your CLI's GitHub repository
-
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
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
--
-
jsoniter
A high-performance 100% compatible drop-in replacement of "encoding/json" (by json-iterator)
Since most of the time would be spent decoding json, you could try to cut this time using https://github.com/bytedance/sonic or https://github.com/json-iterator/go, both are drop-in replacements for the stdlib, sonic is faster.
-
-
Be aware that there is a performance impact compared to using zerolog directly [0] (my uneducated guess is it is likely due to pointer indirection).
[0]: https://github.com/rs/zerolog/issues/571#issuecomment-166202...
-
Hey! fq author here. I have a bunch of related tools in the readme https://github.com/wader/fq?tab=readme-ov-file#tools two suggestions: gnu poke and wireshark (can decode lots of more things then just network protocol)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
-
miller
Miller is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON
-
Also, something that comes pretty close to what I want to do is stash. However, it doesn't handle ebooks, and my library is not nsfw and shouldn't rely on an external database (as no external database for my field of interest exists afaik). But stash ticks almost all the requirements.
-
-
Ponzu
Headless CMS with automatic JSON API. Featuring auto-HTTPS from Let's Encrypt, HTTP/2 Server Push, and flexible server framework written in Go.
-
Project mention: Introducing astjson: Transform and Merge JSON Objects with Unmatched Speed in Go | dev.to | 2023-11-29
In this article, I will introduce you to a new package called astjson that I have been working on for the last couple of weeks. It is a Go package that allows you to transform and merge JSON objects with unmatched speed. It is based on the jsonparser package by buger aka Leonid Bugaev and extends it with the ability to transform and merge JSON objects at unparalleled performance.
-
Project mention: 7 Programming Languages Every Cloud Engineer Should Know in 2024! | dev.to | 2024-03-05
Terraform HCL (HashiCorp Configuration Language) is an essential language for cloud engineers in 2024, particularly for those involved in infrastructure as code (IaC) practices. HCL is the configuration language used by Terraform, a widely adopted tool that enables engineers to define, provision, and manage cloud infrastructure using a declarative configuration approach. Learning Terraform HCL allows cloud engineers to automate the deployment and lifecycle management of cloud resources across various service providers, ensuring consistency, repeatability, and scalability of cloud environments.
-
dasel
Select, put and delete data from JSON, TOML, YAML, XML and CSV files with a single tool. Supports conversion between formats and can be used as a Go package.
-
octosql
OctoSQL is a query tool that allows you to join, analyse and transform data from multiple databases and file formats using SQL.
Project mention: Wazero: Zero dependency WebAssembly runtime written in Go | news.ycombinator.com | 2023-07-01Never got it to anything close to a finished state, instead moving on to doing the same prototype in llvm and then cranelift.
That said, here's some of the wazero-based code on a branch - https://github.com/cube2222/octosql/tree/wasm-experiment/was...
It really is just a very very basic prototype.
-
-
-
You might want to look at tsv-utils, or a similar project: https://github.com/eBay/tsv-utils
For the SQL part, but maybe a lot heavier, you can use one of the projects listed on this page: https://github.com/multiprocessio/dsq (No longer maintained, but has links to lots of other projects)
-
-
GitHub repo: https://github.com/Jeffail/gabs
-
Yeap i've talked to itchyny quite a lot about various changes https://github.com/itchyny/gojq/issues/153 and also upstreamed quite a lot https://github.com/itchyny/gojq/issues?q=author%3Awader like custom iterators (to allow eval, own iterators and "empty" functions), query marshalling (query rewrite tricks) and a bunch of small things and bug fixes. But the largest change to add a JQValue interface is quite complex, other changes like extended literals is also a bit tricky.
Hmm weird list of changes for https://github.com/wader/gojq/compare/fq...itchyny:gojq:main but i guess it is because i haven't kept my main branch in sync. The fq branch should be based on latest gojq/main as of now. I usually try to rebase as quick as possible.
Let me know if you have any other questions or want to help out! maybe email etc as i usually don't check HN comments replies that often :)
-
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
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Go JSON related posts
- Bash/Zsh autocomplete for JSON fields
- Fx 32.0, now with YAML support too
- Fx JSON viewer now supports YAML
- Show HN: I built jq-like scriptable tool to query CSV and JSON with SQLite
- Pkl, a Programming Language for Configuration
- TySON: TypeScript Object Notation
- TySON (TypeScript Object Notation)
-
A note from our sponsor - WorkOS
workos.com | 18 Mar 2024
Index
What are some of the best open-source JSON projects in Go? This list will help you:
Project | Stars | |
---|---|---|
1 | urfave/cli | 21,453 |
2 | fx | 18,169 |
3 | GJSON | 13,455 |
4 | jsoniter | 12,979 |
5 | yq | 10,520 |
6 | zerolog | 9,593 |
7 | fq | 9,297 |
8 | OPA (Open Policy Agent) | 8,997 |
9 | miller | 8,496 |
10 | stash | 7,423 |
11 | jid | 6,697 |
12 | Ponzu | 5,620 |
13 | jsonparser | 5,319 |
14 | hcl | 5,012 |
15 | dasel | 4,799 |
16 | octosql | 4,675 |
17 | easyjson | 4,302 |
18 | minify | 3,553 |
19 | dsq | 3,462 |
20 | gorequest | 3,369 |
21 | gabs | 3,341 |
22 | gojq | 3,016 |
23 | go-json | 2,706 |