alejson

package module
v0.0.0-...-1139d15 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: MIT Imports: 6 Imported by: 2

README

alejson

Simple codec to read/write ale values to/from json strings

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AleMarshal

func AleMarshal(args ...data.Value) data.Value

AleMarshal wraps Marshal in a Ale compatible function

func AleUnmarshal

func AleUnmarshal(args ...data.Value) data.Value

AleUnmarshal wraps Unmarshal in a Ale compatible function

func Marshal

func Marshal(v data.Value) ([]byte, error)

Marshal encodes a data.Value to a JSON literal

data.Sequence other than Object -> JSON Array data.Object -> JSON Object data.Integer within int32 range -> JSON Integer data.Integer outside int32 range -> JSON Float (without decimal) data.Float -> JSON Float data.String -> JSON String data.Keywordd -> JSON String data.True/data.False -> JSON True/False

func Register

func Register(ns namespace.Type)

Register alejson funcitons to the provided namespace

func RegisterQualified

func RegisterQualified(m *namespace.Manager) namespace.Type

RegisterQualified register alejson package under the `json` package name

func Unmarshal

func Unmarshal(input string) (data.Value, error)

Unmarshal input into an ale Value following this rules:

JSON Array -> data.Vector JSON Object -> data.Object JSON Object Keys -> data.Keyword Int values within int32 range -> data.Integer Int values outside of int32 range -> data.Float Float values -> data.Float True/False -> data.True/data.False String -> String

Types

This section is empty.

Jump to

Keyboard shortcuts

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