Categorygithub.com/mayur-tolexo/j2s
repositorypackage
1.0.0
Repository: https://github.com/mayur-tolexo/j2s.git
Documentation: pkg.go.dev

# README

Godocs Go Report Card Open Source Helpers Release

jsonToStruct

Golang code generator for creating struct from json.

INSTALLATION

go get github.com/mayur-tolexo/j2s

Tags:

  • -ip=input.json [Input File (default "input.json")]
  • -op=bakery.go [Output File (default "output.go")]
  • -name=Bakery [Structure Name (default "User")]
  • -reuse=1 [if you want to reuse struct having same fields (default 0)]

Create Struct from console json.

CommandOutput
Screenshot 2019-11-16 at 12 31 41 AMScreenshot 2019-11-16 at 12 32 14 AM

Create struct from json input file.

Screenshot 2019-11-16 at 12 33 10 AM

InputOutput
Screenshot 2019-11-16 at 12 32 37 AMScreenshot 2019-11-16 at 12 33 24 AM