Categorygithub.com/Stebalien/go-json-doc
modulepackage
0.0.2
Repository: https://github.com/stebalien/go-json-doc.git
Documentation: pkg.go.dev

# README

go-json-doc

Build Status codecov

Go documentation generator for JSON structs.

go-json-doc uses reflection to generate JSON schemas for go structs.

Usage

API documentation can be read at Godoc.

doc, err := jsondoc.NewGlossary().Describe(new(struct{
  Name string
  Age int
  Occupation `json:"Job"`
}))

fmt.Println(doc)
// {
//   "Name": "<string>",
//   "Age": "<string>",
//   "Job": "<string>"
// }

A more complete example can be found in the examples directory.

Contribute

PRs accepted.

Contributors

  • Steven Allen (@stebalien)
  • Initial concept by Hector Sanjuan (@hsanjuan)

License

MIT © Steven Allen

# Packages

No description provided by the author

# Functions

NewGlossary creates a new glossary.

# Structs

Glossary describes the set of types used in the structures to be described.

# Type aliases

Array is a helper type for constructing JSON arrays.
Object is a helper type for constructing JSON objects.