json

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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