Json-go - CLI to convert JSON to go and vice versa

Json To Go Struct CLI

codecov

Install

Go version 1.17

  go install github.com/samit22/json-go

Usages

 json-go jtg '{"name": "samit"}'

Example Nested JSON

Owner
Samit Ghimire
Golang, Ruby on Rails, and AWS.
Samit Ghimire
Similar Resources

Fast and flexible JSON encoder for Go

Fast and flexible JSON encoder for Go

Jettison Jettison is a fast and flexible JSON encoder for the Go programming language, inspired by bet365/jingo, with a richer features set, aiming at

Dec 21, 2022

/ˈdʏf/ - diff tool for YAML files, and sometimes JSON

/ˈdʏf/ - diff tool for YAML files, and sometimes JSON

dyff is inspired by the way the old BOSH v1 deployment output reported changes from one version to another by only showing the parts of a YAML file that change.

Dec 29, 2022

HuJSON: JSON for Humans (comments and trailing commas)

HuJSON - Human JSON The HuJSON decoder is a JSON decoder that also allows comments, both /* ... */ and // to end of line trailing commas on arrays and

Dec 22, 2022

tson is JSON viewer and editor written in Go

tson is JSON viewer and editor written in Go

tson tson is JSON viewer and editor written in Go. This tool displays JSON as a tree and you can search and edit key or values. Support OS Mac Linux I

Nov 2, 2022

JSONata in Go Package jsonata is a query and transformation language for JSON

JSONata in Go Package jsonata is a query and transformation language for JSON. It's a Go port of the JavaScript library JSONata.

Nov 8, 2022

Slow and unreliable JSON parser generator (in progress)

VivaceJSON Fast and reliable JSON parser generator Todo List parse fields parse types generate struct generate (keypath+key) to struct Value Mapping F

Nov 26, 2022

Kazaam was created with the goal of supporting easy and fast transformations of JSON data with Golang

kazaam Description Kazaam was created with the goal of supporting easy and fast transformations of JSON data with Golang. This functionality provides

Sep 17, 2021

Golang JSON decoder supporting case-sensitive, number-preserving, and strict decoding use cases

Golang JSON decoder supporting case-sensitive, number-preserving, and strict decoding use cases

Dec 9, 2022

Easy JSON parsing, stringifying, and accesing

Easy JSON parsing, stringifying, and accesing

Nov 23, 2021
Comments
  • Copy generated struct to clipboard

    Copy generated struct to clipboard

    Instead of only printing auto generated struct in the console, we can add copy to clipboard functionality so that users can generate the struct and paste it where ever they want without copying it manually.

  • Better alignment of the structs

    Better alignment of the structs

    The structs currently does not have a correct alignment Example

     type AutoStruct struct {
    	Nested struct {
    		Name  string      `json:"name"`
    		Phone interface{} `json:"phone"`
    	} `json:"nested"`
    	Name      string  `json:"name"`
    	FirstName string  `json:"first_name"`
    	Age       float64 `json:"age"`
    }
    

    Generally, the struct would look like

    type Case struct {
    	ID           primitive.ObjectID `bson:"_id,omitempty"`
    	Country      string             `bson:"country"`
    	Provice      int                `bson:"province"`
    	District     int                `bson:"district"`
    	Municipality int                `bson:"municipality"`
    	Modified     string             `bson:"modified_on"`
    }
    
convert JSON of a specific format to a type structure(Typescript type or more)

json2type convert JSON of a specific format to a type structure(Typescript type or more) Quick Start CLI Install use go tool install go install github

Mar 28, 2022
Convert JSON string to Graphql

Convert JSON in string type (example below) to GraphQL Input in GolangConvert JSON in string type (example below) to GraphQL Input in Golang

Oct 5, 2021
Devto-json2md - Convert the dev.to blog JSON export into Markdown files

devto-json2md Convert dev.to blog JSON export into Markdown files Features Exports Markdown compatible files using Hugo-compatible front-matter fields

Jan 8, 2022
Package json implements encoding and decoding of JSON as defined in RFC 7159

Package json implements encoding and decoding of JSON as defined in RFC 7159. The mapping between JSON and Go values is described in the documentation for the Marshal and Unmarshal functions

Jun 26, 2022
JSON Spanner - A Go package that provides a fast and simple way to filter or transform a json document

JSON SPANNER JSON Spanner is a Go package that provides a fast and simple way to

Sep 14, 2022
CLI tool to handle JSON logs

logit is a CLI tool that consumes logs in JSON and feeds them into a logs storage like file, Amazon CloudWatch, or Slack.

Sep 28, 2022
Get JSON values quickly - JSON parser for Go
Get JSON values quickly - JSON parser for Go

get json values quickly 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

Dec 28, 2022
JSON diff library for Go based on RFC6902 (JSON Patch)

jsondiff jsondiff is a Go package for computing the diff between two JSON documents as a series of RFC6902 (JSON Patch) operations, which is particula

Dec 4, 2022
Fast JSON encoder/decoder compatible with encoding/json for Go
Fast JSON encoder/decoder compatible with encoding/json for Go

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

Jan 6, 2023
Fast JSON parser and validator for Go. No custom structs, no code generation, no reflection

fastjson - fast JSON parser and validator for Go Features Fast. As usual, up to 15x faster than the standard encoding/json. See benchmarks. Parses arb

Jan 5, 2023