Documentation
¶
Overview ¶
Package json is a simple JSON encoder/decoder for gopher-lua.
Documentation ¶
The following functions are exposed by the library:
decode(string): Decodes a JSON string. Returns nil and an error string if
the string could not be decoded.
encode(value): Encodes a value into a JSON string. Returns nil and an error
string if the value could not be encoded.
Example ¶
Below is an example usage of the library:
L := lua.NewState() luajson.Preload(s)
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFunction = errors.New("cannot encode function to JSON") ErrChannel = errors.New("cannot encode channel to JSON") ErrState = errors.New("cannot encode state to JSON") ErrUserData = errors.New("cannot encode userdata to JSON") ErrNested = errors.New("cannot encode recursively nested tables to JSON") )
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.