mirror of
https://github.com/alda-lang/alda.git
synced 2026-02-27 18:24:13 +01:00
I haven't yet implemented the part where use the Alda API to check for versions newer than the one installed. This commit is just the actual update mechanism. `alda update` takes a flag that lets you specify which version you want to install. That works, as of this commit, and hopefully I've done it in a way that will work on Windows, macOS, and Linux. CI will tell me whether or not this is the case when I push this commit.
29 lines
946 B
Go
29 lines
946 B
Go
package json
|
|
|
|
import "github.com/Jeffail/gabs/v2"
|
|
|
|
// A Container is a JSON array or object.
|
|
//
|
|
// This is a type alias for the Container type in github.com/Jeffail/gabs/v2.
|
|
type Container = gabs.Container
|
|
|
|
// ParseJSON takes a []byte and returns either a Container (JSON array or
|
|
// object) or an error if the parse was unsuccessful.
|
|
//
|
|
// This is an alias for the ParseJSON function in github.com/Jeffail/gabs/v2.
|
|
var ParseJSON = gabs.ParseJSON
|
|
|
|
// ParseJSONBuffer takes an io.Reader and returns either a Container (JSON array
|
|
// or object) or an error if the read or parse was unsuccessful.
|
|
//
|
|
// This is an alias for the ParseJSONBuffer function in
|
|
// github.com/Jeffail/gabs/v2.
|
|
var ParseJSONBuffer = gabs.ParseJSONBuffer
|
|
|
|
// RepresentableAsJSON is an interface implemented by types that can be
|
|
// represented as JSON data.
|
|
type RepresentableAsJSON interface {
|
|
// JSON returns a JSON data representation of the object.
|
|
JSON() *Container
|
|
}
|