Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = module.NewBuiltin().
Func("decode(data bytes|string) (v any) decodes JSON-encoded data and returns the resulting value", jsonDecode).
Func("encode(v any) (data bytes) returns the JSON encoding of v", jsonEncode).
Func("indent(data bytes|string, prefix string, indent string) (result bytes) returns an indented form of the JSON-encoded data", jsonIndent).
Func("html_escape(data bytes|string) (result bytes) returns the JSON-encoded data with &, <, and > characters escaped to \u0026, \u003c, and \u003e", jsonHTMLEscape)
Functions ¶
Types ¶
type SyntaxError ¶
type SyntaxError struct {
Offset int64 // error occurred after reading Offset bytes
// contains filtered or unexported fields
}
A SyntaxError is a description of a JSON syntax error.
func (*SyntaxError) Error ¶
func (e *SyntaxError) Error() string
Click to show internal directories.
Click to hide internal directories.