go: cuelang.org/go/internal/encoding/json Index | Files

package json

import "cuelang.org/go/internal/encoding/json"

Index

Package Files

encode.go

func Encode Uses

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.

Package json imports 9 packages (graph) and is imported by 2 packages. Updated 2020-09-28. Refresh now. Tools for package owners.