json-to-go - The original: Translates JSON into a Go type in your browser instantly

  •        102

This is a sister tool to curl-to-Go, which converts curl commands to Go code.Contributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change.

https://mholt.github.io/json-to-go/
https://github.com/mholt/json-to-go

Tags
Implementation
License
Platform

   




Related Projects

easyjson - Fast JSON serializer for golang.

  •    Go

Package easyjson provides a fast and easy way to marshal/unmarshal Go structs to/from JSON without the use of reflection. In performance tests, easyjson outperforms the standard encoding/json package by a factor of 4-5x, and other JSON encoding packages by a factor of 2-3x. easyjson aims to keep generated Go code simple enough so that it can be easily optimized or fixed. Another goal is to provide users with the ability to customize the generated code by providing options not available with the standard encoding/json package, such as generating "snake_case" names or enabling omitempty behavior by default.

gojsonq - A simple Go package to Query over JSON Data

  •    Go

You can query your document using the various query methods such as Find, First, Nth, Pluck, Where, OrWhere, WhereIn, WhereStartsWith, WhereEndsWith, WhereContains, Sort, GroupBy, SortBy and so on. Also you can aggregate data after query using Avg, Count, Max, Min, Sum etc. If you encounter any bugs or issues, feel free to open an issue at github.

go-jose - An implementation of JOSE standards (JWE, JWS, JWT) in Go

  •    Go

Package jose aims to provide an implementation of the Javascript Object Signing and Encryption set of standards. This includes support for JSON Web Encryption, JSON Web Signature, and JSON Web Token standards.Disclaimer: This library contains encryption software that is subject to the U.S. Export Administration Regulations. You may not export, re-export, transfer or download this code or any part of it in violation of any United States law, directive or regulation. In particular this software may not be exported or re-exported in any form or on any media to Iran, North Sudan, Syria, Cuba, or North Korea, or to denied persons or entities mentioned on any US maintained blocked list.

go-json-rest - A quick and easy way to setup a RESTful JSON API

  •    Go

Go-Json-Rest is a thin layer on top of net/http that helps building RESTful JSON APIs easily. It provides fast and scalable request routing using a Trie based implementation, helpers to deal with JSON requests and responses, and middlewares for functionalities like CORS, Auth, Gzip, Status ...The recommended way of using this library in your project is to use the "vendoring" method, where this library code is copied in your repository at a specific revision. This page is a good summary of package management in Go.

jsonparser - Alternative JSON parser for Go that does not require schema (so far fastest)

  •    Go

It does not require you to know the structure of the payload (eg. create structs), and allows accessing fields by providing the path to them. It is up to 10 times faster than standard encoding/json package (depending on payload size and usage), allocates no memory. See benchmarks below.Originally I made this for a project that relies on a lot of 3rd party APIs that can be unpredictable and complex. I love simplicity and prefer to avoid external dependecies. encoding/json requires you to know exactly your data structures, or if you prefer to use map[string]interface{} instead, it will be very slow and hard to manage. I investigated what's on the market and found that most libraries are just wrappers around encoding/json, there is few options with own parsers (ffjson, easyjson), but they still requires you to create data structures.


djson - Fast Go decoder for dynamic JSON

  •    Go

DJSON is a JSON decoder for Go that is 2~ to 3~ times faster than the standard encoding/json and the existing solutions, when dealing with arbitrary JSON payload. It is a good approach for people who are using json.Unmarshal together with interface{}, don't know what the schema is, and still want good performance with minimal changes.

grpc-gateway - gRPC to JSON proxy generator following the gRPC HTTP spec

  •    Go

grpc-gateway is a plugin of protoc. It reads gRPC service definition, and generates a reverse-proxy server which translates a RESTful JSON API into gRPC. This server is generated according to the google.api.http annotation in your gRPC service definition. It helps you to provide your APIs in both gRPC and RESTful style at the same time.

jstream - Streaming JSON parser for Go

  •    Go

jstream is a streaming JSON parser and value extraction library for Go.

jason - Easy-to-use JSON Library for Go

  •    Go

Jason is an easy-to-use JSON library for Go. Jason is designed to be convenient for reading arbitrary JSON while still honoring the strictness of the language. Inspired by other libraries and improved to work well for common use cases. It currently focuses on reading JSON data rather than creating it. API Documentation can be found on godoc.org.

zerolog - Zero Allocation JSON Logger

  •    Go

The zerolog package provides a fast and simple logger dedicated to JSON output.Zerolog's API is designed to provide both a great developer experience and stunning performance. Its unique chaining API allows zerolog to write JSON log events by avoiding allocations and reflection.

GJSON - JSON Parser for Go

  •    Go

GJSON is a Go package that provides a fast and simple way to get values from a json document. It has features such as one line retrieval, dot notation paths, iteration.

yaml - A better way to marshal and unmarshal YAML in Golang

  •    Go

A wrapper around go-yaml designed to enable a better way of handling YAML when marshaling to and from structs. In short, this library first converts YAML to JSON using go-yaml and then uses json.Marshal and json.Unmarshal to convert to or from the struct. This means that it effectively reuses the JSON struct tags as well as the custom JSON methods MarshalJSON and UnmarshalJSON unlike go-yaml. For a detailed overview of the rationale behind this method, see this blog post.

render - Go package for easily rendering JSON, XML, binary data, and HTML templates responses.

  •    Go

Render is a package that provides functionality for easily rendering JSON, XML, text, binary data, and HTML templates. This package is based on the Martini render work.Go 1.6 introduces a new block action. This conflicts with Render's included block template function. To provide an easy migration path, a new function was created called partial. It is a duplicate of the old block function. It is advised that all users of the block function update their code to avoid any issues in the future. Previous to Go 1.6, Render's block functionality will continue to work but a message will be logged urging you to migrate to the new partial function.

ffjson - faster JSON serialization for Go

  •    Go

ffjson generates static MarshalJSON and UnmarshalJSON functions for structures in Go. The generated functions reduce the reliance upon runtime reflection to do serialization and are generally 2 to 3 times faster. In cases where ffjson doesn't understand a Type involved, it falls back to encoding/json, meaning it is a safe drop in replacement. By using ffjson your JSON serialization just gets faster with no additional code changes. When you change your struct, you will need to run ffjson again (or make it part of your build tools).

Ponzu - Headless CMS with automatic JSON API

  •    Go

Ponzu is a powerful and efficient open-source HTTP server framework and CMS. It provides automatic, free, and secure HTTP/2 over TLS, a useful CMS and scaffolding to generate content editors, and a fast HTTP API on which to build modern applications.

Flexjson - Lightweight JSON parser

  •    Java

Flexjson is a lightweight library for serializing Java objects into JSON. What's different about Flexjson is it's control over what gets serialized allowing both deep and shallow copies of objects.

JSV - A JavaScript implementation of an extendable, fully compliant JSON Schema validator.

  •    Javascript

A JSON validator is a program that takes JSON data and, with a provided schema, will ensure that the provided JSON is structured in the way defined by the schema. This ensures that if validation has passed, the JSON instance is guaranteed to be in the expected format. It will also provide an explanation on why a particular instance failed validation. There is no one way to validate JSON, just like there is no one way to validate XML. Even the JSON Schema specification has gone through several revisions which are not 100% backwards compatible with each other. To solve the issue of using numerous schemas already written to older specifications, JSV provides customizable environments to validate your JSON within.

api2go - JSONAPI.org Implementation for Go

  •    Go

A JSON API Implementation for Go, to be used e.g. as server for Ember Data. Api2go will Marshal/Unmarshal exactly like the internal json package from Go with one addition: It will decorate the Marshalled json with jsonapi meta objects. Jsonapi wraps the payload inside an attributes object. The rest is just Meta-Data which will be generated by api2go.

Noggit - JSON streaming parser

  •    Java

Noggit is the world's fastest streaming JSON parser for Java. It is used in Apache Solr.