Go JSON

Open-source Go projects categorized as JSON
Topics: Golang Go YAML CLI TOML

Top 23 Go JSON Projects

  • urfave/cli

    A simple, fast, and fun package for building command line apps in Go (by urfave)

  • fx

    Terminal JSON viewer & processor

  • Project mention: Bash/Zsh autocomplete for JSON fields | news.ycombinator.com | 2024-03-16
  • 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.

    InfluxDB logo
  • GJSON

    Get JSON values quickly - JSON parser for Go

  • Project mention: Rob Pike: Gobs of data (2011) | news.ycombinator.com | 2023-12-04

    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

  • jsoniter

    A high-performance 100% compatible drop-in replacement of "encoding/json" (by json-iterator)

  • Project mention: Handling high-traffic HTTP requests with JSON payloads | /r/golang | 2023-12-07

    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.

  • yq

    yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor

  • Project mention: Show HN: Flatito, grep for YAML and JSON files | news.ycombinator.com | 2024-03-25

    What I often use to just get the full key paths is yq (https://github.com/mikefarah/yq), piping into grep when necessary

      yq -o=props 

  • zerolog

    Zero Allocation JSON Logger

  • Project mention: Go 1.21 Released | news.ycombinator.com | 2023-08-08

    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...

  • fq

    jq for binary formats - tool, language and decoders for working with binary and text formats

  • Project mention: How to Use JSON Path | news.ycombinator.com | 2024-05-03

    I see, thanks for replying and no worries! yeap some of the "self-describing" formats like msgpack, cbor etc will because of how fq works have to be decoded into something more of a meta-msgpack etc.

    About blobs, if you want to change how (possibly large) binaries are represented as JSON you can use the bits_format options, see https://github.com/wader/fq/blob/master/doc/usage.md#options, so fq -o bits_format=md5 torepr ...

    I can highly recommend to learn jq, it's what makes fq really useful, and as a bonus you will learn jq in general! :)

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • OPA (Open Policy Agent)

    Open Policy Agent (OPA) is an open source, general-purpose policy engine.

  • Project mention: The API database architecture – Stop writing HTTP-GET endpoints | news.ycombinator.com | 2024-05-10

    Yeah, I fully agree. The tooling for putting that much logic into the database is just not great. I've been decently happy with Sqitch[0] for DB change management, but even with that you don't really get a good basis for testing some of the logic you could otherwise test in isolation in app code.

    I've also tried to rely heavily on the database handling security and authorization, but as soon as you start to do somewhat non-trivial attribute-/relationship-based authorization (as you would find in many products nowadays), it really isn't fun anymore, and you spend a lot of the time you saved on manually building backend routes on trying to fit you authz model into those basic primitives (and avoiding performance bottlenecks). Especially compares to other modern authz solutions like OPA[1] or oso[2] it really doesn't stack up.

    [0]: https://github.com/sqitchers/sqitch

    [1]: https://www.openpolicyagent.org

    [2]: https://www.osohq.com

  • miller

    Miller is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON

  • Project mention: Qsv: Efficient CSV CLI Toolkit | news.ycombinator.com | 2023-12-22
  • stash

    An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc

  • Project mention: Organizing a huge library | /r/HomeServer | 2023-10-12

    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.

  • jid

    json incremental digger

  • 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.

  • jsonparser

    One of the fastest alternative JSON parser for Go that does not require schema

  • 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.

  • hcl

    HCL is the HashiCorp configuration language.

  • Project mention: HCL: Toolkit for Structured Configuration Languages | news.ycombinator.com | 2024-04-23
  • 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.

  • Project mention: jq 1.7 Released | news.ycombinator.com | 2023-09-06
  • 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-01

    Never 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.

  • easyjson

    Fast JSON serializer for golang.

  • dsq

    Commandline tool for running SQL queries against JSON, CSV, Excel, Parquet, and more.

  • Project mention: Tracking SQLite Database Changes in Git | news.ycombinator.com | 2023-11-02

    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)

  • minify

    Go minifiers for web formats (by tdewolff)

  • gorequest

    GoRequest -- Simplified HTTP client ( inspired by nodejs SuperAgent )

  • gabs

    For parsing, creating and editing unknown or dynamic JSON in Go

  • Project mention: 6 🔥 Awesome Golang packages (web devs) | dev.to | 2023-12-04

    GitHub repo: https://github.com/Jeffail/gabs

  • gojq

    Pure Go implementation of jq

  • Project mention: To a Man with `Jq`, Everything Looks Like JSON | news.ycombinator.com | 2023-12-08

    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 :)

  • go-json

    Fast JSON encoder/decoder compatible with encoding/json for Go

  • Project mention: API: Go, .NET, Rust | /r/dotnet | 2023-12-09

    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

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Go JSON related posts

Index

What are some of the best open-source JSON projects in Go? This list will help you:

Project Stars
1 urfave/cli 21,702
2 fx 18,570
3 GJSON 13,675
4 jsoniter 13,100
5 yq 10,911
6 zerolog 9,900
7 fq 9,422
8 OPA (Open Policy Agent) 9,185
9 miller 8,598
10 stash 8,291
11 jid 6,809
12 Ponzu 5,645
13 jsonparser 5,357
14 hcl 5,117
15 dasel 4,889
16 octosql 4,707
17 easyjson 4,358
18 dsq 3,652
19 minify 3,604
20 gorequest 3,398
21 gabs 3,384
22 gojq 3,103
23 go-json 2,800

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com