gonotation

module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT

README

GoNotation

this repo is the implementation of the notation package in golang.

Example:

array := []glob.Glob{
		glob.NewGlob("dog"),
		glob.NewGlob("car"),
		glob.NewGlob("!car.brand"),
}
notations := notation.New(`{ "car": { "brand": "Dodge", "model": "Charger" }, "dog": { "breed": "Akita" } }`)
filtered, _ := notations.Filter(array, false)
fmt.Println(filtered)

in the example above our globs are ["dog", "car", "!car.brand"]
they will be normalize with the glob package and then filtered with the notation package.
this repo uses sjson and gjson under the hood for json manipulation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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