j2struct

package
v0.0.0-...-7742730 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ForceFloats bool
View Source
var NameAsSub bool

Functions

func Extend

func Extend(iresult any) any

func FmtFieldName

func FmtFieldName(s string) string

FmtFieldName formats a string as a struct key

Example:

FmtFieldName("foo_id")

Output: FooID

func Generate

func Generate(input io.Reader, structName string, tags []string, subStruct bool, convertFloats bool) ([]byte, error)

Generate a struct definition given a JSON string representation of an object and a name structName.

func ToStructWithValue

func ToStructWithValue(input io.Reader, structName string, convertFloats bool) ([]byte, error)

Generate a struct definition given a JSON string representation of an object and a name structName.

Types

This section is empty.

Jump to

Keyboard shortcuts

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