json2struct

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunJSON2Struct

func RunJSON2Struct(w io.Writer, r io.Reader, args []string, opts Options) error

RunJSON2Struct converts JSON to Go struct definition

Types

type Options

type Options struct {
	Name       string // struct name (default: "Root")
	Package    string // package name (default: "main")
	Inline     bool   // inline nested structs
	OmitEmpty  bool   // add omitempty to all fields
	UsePointer bool   // use pointers for optional fields
}

Options configures the json2struct command behavior

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL