json

package
v0.3.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(n ast.Node) (b []byte, err error)

Encode converts a CUE AST to JSON.

The given file must only contain values that can be directly supported by JSON:

Type          Restrictions
BasicLit
File          no imports, aliases, or definitions
StructLit     no embeddings, aliases, or definitions
List
Field         must be regular; label must be a BasicLit or Ident

Comments and attributes are ignored.

Types

This section is empty.

Jump to

Keyboard shortcuts

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