Documentation
¶
Overview ¶
Package bag contains the bag functions. A bag is flexible a container for data composed of t, nil, integer, float, string, time, list, as well as the special bag::map and bag::false. It can be parsed from JSON or SEN (ojg package) and be encoded in the same way. It can also be converted to and from native LISP with bag::map becoming an assoc list. The bag::false value is the only non-native value that is retained since LISP does not differentiate between nil and boolean false.
Index ¶
- Constants
- Variables
- func Flavor() *flavors.Flavor
- func ObjectToBag(s *slip.Scope, obj slip.Object, depth int) (v any)
- func SetCompileScript(s *slip.Scope)
- type Compare
- type DiscoverJSON
- type Get
- type Has
- type JSONParse
- type Make
- type MakeBagPath
- type Modify
- type Native
- type Parse
- type Path
- func (obj Path) Append(b []byte) []byte
- func (obj Path) Equal(other slip.Object) (eq bool)
- func (obj Path) Eval(s *slip.Scope, depth int) slip.Object
- func (obj Path) Hierarchy() []slip.Symbol
- func (obj Path) LoadForm() slip.Object
- func (obj Path) Simplify() interface{}
- func (obj Path) String() string
- type Pathp
- type Procedure
- type Read
- type Remove
- type Set
- type Walk
- type Write
Constants ¶
const PathSymbol = slip.Symbol("bag-path")
PathSymbol is the symbol with a value of "path".
Variables ¶
var ( // Pkg is the Bag package. Pkg = slip.Package{ Name: "bag", Nicknames: []string{}, Doc: "Home of symbols defined for the bag package.", PreSet: slip.DefaultPreSet, } )
Functions ¶
func ObjectToBag ¶ added in v0.7.0
ObjectToBag is the same as slip.Simplify except for assoc lists which are converted to map[string]any.
func SetCompileScript ¶ added in v0.9.9
SetCompileScript sets the World instance for the jp.CompileScript function.
Types ¶
type DiscoverJSON ¶ added in v1.3.1
DiscoverJSON represents the DiscoverJSON function.
type MakeBagPath ¶
MakeBagPath represents the makeBagPath function.
type Path ¶
Path is a JSONPath.
type Procedure ¶ added in v0.9.9
type Procedure struct {
// contains filtered or unexported fields
}
Procedure defines the interface for functions for script fragments between [( and )] delimiters.