json

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONRenderer

type JSONRenderer struct {
	// contains filtered or unexported fields
}

JSONRenderer provides a simple string renderer.

func NewJSONRenderer

func NewJSONRenderer(opt *renderer.Options) *JSONRenderer

func (*JSONRenderer) DeReference

func (r *JSONRenderer) DeReference() bool

func (*JSONRenderer) Indent

func (r *JSONRenderer) Indent() int

func (*JSONRenderer) Path

func (r *JSONRenderer) Path(t *types.TypeNode) []string

Path is a function that builds a path string from a TypeNode. Format is: [<Name>:]<Type>[:<TypeRef>] - If Name is set, prefix with "Name", otherwise "-" - If TypeRef is set, suffix with "TypeRef", otherwise "-" - If Error is set, wrap entire string with "!"

func (*JSONRenderer) Post

func (r *JSONRenderer) Post(t *types.TypeNode) []string

func (*JSONRenderer) Pre

func (r *JSONRenderer) Pre(t *types.TypeNode) []string

func (*JSONRenderer) Prefix

func (r *JSONRenderer) Prefix() string

func (*JSONRenderer) ProcessSchema

func (r *JSONRenderer) ProcessSchema(schema *types.Schema, settings ...string) ([]string, error)

func (*JSONRenderer) SetIndent

func (r *JSONRenderer) SetIndent(value int)

Jump to

Keyboard shortcuts

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