encoding

package
v2.0.0-alpha.64 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(_ context.Context, arg runtime.Value) (runtime.Value, error)

base64_decode decodes standard padded Base64, preserving arbitrary bytes. Invalid encoding returns an error. @param text {String} The encoded data. @return {Binary} The decoded bytes.

func Base64Encode

func Base64Encode(_ context.Context, arg runtime.Value) (runtime.Value, error)

base64_encode encodes raw bytes using standard padded Base64. Strings supply their UTF-8 bytes. @param value {String | Binary} The input data. @return {String} Standard padded Base64 text.

func HTMLEscape

func HTMLEscape(_ context.Context, arg runtime.Value) (runtime.Value, error)

html_escape escapes the five HTML-sensitive characters: ampersand, angle brackets, and quotes. @param text {String} The input string. @return {String} The converted string.

func HTMLUnescape

func HTMLUnescape(_ context.Context, arg runtime.Value) (runtime.Value, error)

html_unescape decodes HTML character references. @param text {String} The input string. @return {String} The converted string.

func JSONParse

func JSONParse(ctx context.Context, arg runtime.Value) (runtime.Value, error)

json_parse returns a value described by the JSON-encoded input string. @param str {String} The string to parse as JSON. @return {Any} Parsed value.

func JSONStringify

func JSONStringify(ctx context.Context, arg runtime.Value) (runtime.Value, error)

json_stringify returns a JSON string representation of the input value. @param str {Any} The input value to serialize. @return {String} JSON string.

func QueryEscape

func QueryEscape(_ context.Context, arg runtime.Value) (runtime.Value, error)

query_escape escapes query-form data: spaces become + and literal plus signs become %2B. @param text {String} The input string. @return {String} The converted string.

func QueryUnescape

func QueryUnescape(_ context.Context, arg runtime.Value) (runtime.Value, error)

query_unescape decodes query-form data, including + as a space. Malformed percent escapes return an error. @param text {String} The input string. @return {String} The converted string.

func RegisterLib

func RegisterLib(ns runtime.Namespace)

RegisterLib registers serialization and escaping operations in the encoding namespace.

Types

This section is empty.

Jump to

Keyboard shortcuts

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