Ad hoc JSON parsing

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • fastjson

    Fast JSON parser and validator for Go. No custom structs, no code generation, no reflection (by valyala)

  • In Go if I need to extract just a few fields from a large JSON document it's hard to beat https://github.com/valyala/fastjson

  • oapi-codegen

    Generate Go client and server boilerplate from OpenAPI 3 specifications

  • The service you're using has a swagger so you should try to create proper models in the first place. There are go code generators such as oapi-codegen. This style of programming is only good for throw-away code, python works well for that, if it's all you need, well, maybe stick to python in the first place. Yet even in python it's not considered production-ready good practice, proper code should use type-safe bindings such as with pydantic

  • 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

  • JSON-to-Go

    Translates JSON into a Go type in your browser instantly (original)

  • Swagger is mentioned; see also the very useful and often used https://mholt.github.io/json-to-go/ .

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts