proxy.golang.org : github.com/tvastar/nice
Package nice is a lisp-like call expression format. This package defines a very simple lisp-like call expression format: The expressions is a list which uses the pipe symbol ("|") to separate out the elements of the list. This is meant to be both a data interchange format as well as a way to represent expressions in domain specific languages. The encoded format of expressions is quite simple with four special characters: "(", "|", ")" and "\" with the backslash used only to escape the special characters. The brackets introduce expressions where the arguments are separated by the pipe "|" symbol. When the expression does not start with brackets, it is considered as a raw sequence of bytes. As in Lisp, the first element of the list provides the function name to invoke with the rest of the list as arguments. If the first byte is not a bracket-open, then the whole sequence is treated as a raw sequence of bytes (i.e. a single atomic value). As with Lisp, if there is a list within the first element of the list, that list is expected to be evaluated to find the name of the function to run. Example Encoding: A call like add(x,y) would be represented by something like: where the x and y are recursively encoded the same way. See https://godoc.org/github.com/tvastar/nice/json for a codec that works with json-like types ([]interface{}, map[string]interface{}, etc). See https://godoc.org/github.com/tvaster/nice/nicer for a codec that marhsals and unmarshals any particular native Golang type. Due to the lazy evaluation nature of this package, some parse errors are deferred. An example is the following invalid string:
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/tvastar/nice
License: MIT
Latest release: almost 7 years ago
First release: almost 7 years ago
Namespace: github.com/tvastar
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 20 days ago