json

package
v1.6.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	XGoPackage = "github.com/goplus/xgo/dql/maps"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node = maps.Node

Node represents a map[string]any or []any node.

type NodeSet

type NodeSet = maps.NodeSet

NodeSet represents a set of JSON nodes.

func New

func New(r io.Reader) NodeSet

New creates a JSON NodeSet from JSON data read from r.

func Source

func Source(r any) (ret NodeSet)

Source creates a JSON NodeSet from various source types: - string: treats the string as a file path, opens the file, and reads JSON data from it. - []byte: reads JSON data from the byte slice. - io.Reader: reads JSON data from the provided reader. - map[string]any: creates a NodeSet from the provided map. - []any: creates a NodeSet from the provided slice. - Node: creates a NodeSet containing the single provided node. - iter.Seq[Node]: directly uses the provided sequence of nodes. - NodeSet: returns the provided NodeSet as is. If the source type is unsupported, it panics.

Jump to

Keyboard shortcuts

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