Marshalls

package
v0.0.0-...-f3deeb4 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package Marshalls provides methods for working with Marshalls object instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Advanced

func Advanced() class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

func Base64ToRaw

func Base64ToRaw(base64_str string) []byte

Returns a decoded [PackedByteArray] corresponding to the Base64-encoded string [param base64_str].

func Base64ToUtf8

func Base64ToUtf8(base64_str string) string

Returns a decoded string corresponding to the Base64-encoded string [param base64_str].

func Base64ToVariant

func Base64ToVariant(base64_str string) any

Returns a decoded [Variant] corresponding to the Base64-encoded string [param base64_str]. If [param allow_objects] is [code]true[/code], decoding objects is allowed. Internally, this uses the same decoding mechanism as the [method @GlobalScope.bytes_to_var] method. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.

func RawToBase64

func RawToBase64(array []byte) string

Returns a Base64-encoded string of a given [PackedByteArray].

func Utf8ToBase64

func Utf8ToBase64(utf8_str string) string

Returns a Base64-encoded string of the UTF-8 string [param utf8_str].

func VariantToBase64

func VariantToBase64(v any) string

Returns a Base64-encoded string of the [Variant] [param variant]. If [param full_objects] is [code]true[/code], encoding objects is allowed (and can potentially include code). Internally, this uses the same encoding mechanism as the [method @GlobalScope.var_to_bytes] method.

Types

This section is empty.

Jump to

Keyboard shortcuts

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