Marshalls

Inherits: Object

Data transformation (marshalling) and encoding helpers.

Description

Provides data transformation and encoding utility functions.

Methods

PoolByteArray base64_to_raw ( String base64_str )
String base64_to_utf8 ( String base64_str )
Variant base64_to_variant ( String base64_str, bool allow_objects=false )
String raw_to_base64 ( PoolByteArray array )
String utf8_to_base64 ( String utf8_str )
String variant_to_base64 ( Variant variant, bool full_objects=false )

Method Descriptions

PoolByteArray base64_to_raw ( String base64_str )

Returns a decoded PoolByteArray corresponding to the Base64-encoded string base64_str.

String base64_to_utf8 ( String base64_str )

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

Variant base64_to_variant ( String base64_str, bool allow_objects=false )

Returns a decoded Variant corresponding to the Base64-encoded string base64_str. If allow_objects is true, decoding objects is allowed.

Warning: 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.

String raw_to_base64 ( PoolByteArray array )

Returns a Base64-encoded string of a given PoolByteArray.

String utf8_to_base64 ( String utf8_str )

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

String variant_to_base64 ( Variant variant, bool full_objects=false )

Returns a Base64-encoded string of the Variant variant. If full_objects is true, encoding objects is allowed (and can potentially include code).

© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/3.2/classes/class_marshalls.html