2017-09-12 20:42:36 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-02-14 13:18:53 +00:00
<class name= "Marshalls" inherits= "Object" version= "4.0" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2017-09-12 20:42:36 +00:00
<brief_description >
2023-01-21 11:25:29 +00:00
Data transformation (marshaling) and encoding helpers.
2017-09-12 20:42:36 +00:00
</brief_description>
<description >
2017-09-12 22:18:26 +00:00
Provides data transformation and encoding utility functions.
2017-09-12 20:42:36 +00:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "base64_to_raw" >
2021-07-30 13:28:05 +00:00
<return type= "PackedByteArray" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "base64_str" type= "String" />
2017-09-12 20:42:36 +00:00
<description >
2022-08-12 13:36:48 +00:00
Returns a decoded [PackedByteArray] corresponding to the Base64-encoded string [param base64_str].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "base64_to_utf8" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "base64_str" type= "String" />
2017-09-12 20:42:36 +00:00
<description >
2022-08-12 13:36:48 +00:00
Returns a decoded string corresponding to the Base64-encoded string [param base64_str].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "base64_to_variant" >
2021-07-30 13:28:05 +00:00
<return type= "Variant" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "base64_str" type= "String" />
<param index= "1" name= "allow_objects" type= "bool" default= "false" />
2017-09-12 20:42:36 +00:00
<description >
2022-08-12 13:36:48 +00:00
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.
2023-01-17 17:42:26 +00:00
Internally, this uses the same decoding mechanism as the [method @GlobalScope.bytes_to_var] method.
2019-06-21 23:04:47 +00:00
[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.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "raw_to_base64" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "array" type= "PackedByteArray" />
2017-09-12 20:42:36 +00:00
<description >
2020-02-18 12:59:24 +00:00
Returns a Base64-encoded string of a given [PackedByteArray].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "utf8_to_base64" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "utf8_str" type= "String" />
2017-09-12 20:42:36 +00:00
<description >
2022-08-12 13:36:48 +00:00
Returns a Base64-encoded string of the UTF-8 string [param utf8_str].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "variant_to_base64" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "variant" type= "Variant" />
<param index= "1" name= "full_objects" type= "bool" default= "false" />
2017-09-12 20:42:36 +00:00
<description >
2022-08-12 13:36:48 +00:00
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).
2023-01-17 17:42:26 +00:00
Internally, this uses the same encoding mechanism as the [method @GlobalScope.var_to_bytes] method.
2017-09-12 20:42:36 +00:00
</description>
</method>
</methods>
</class>