JSONParseResult

Data class wrapper for decoded JSON.

Returned by JSON.parse, JSONParseResult contains decoded JSON or error information if JSON source not successfully parsed. You can check if JSON source was successfully parsed with if json_result.error == OK.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

getError
GodotError getError()
getErrorLine
long getErrorLine()
getErrorString
String getErrorString()
getResult
Variant getResult()
opAssign
JSONParseResult opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(JSONParseResult other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
setError
void setError(long error)
setErrorLine
void setErrorLine(long error_line)
setErrorString
void setErrorString(StringArg0 error_string)
setResult
void setResult(VariantArg0 result)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

error
GodotError error [@property getter]
long error [@property setter]

The error type if JSON source was not successfully parsed. See @GlobalScope ERR_* constants.

errorLine
long errorLine [@property getter]
long errorLine [@property setter]

The line number where the error occurred if JSON source was not successfully parsed.

errorString
String errorString [@property getter]
String errorString [@property setter]

The error message if JSON source was not successfully parsed. See @GlobalScope ERR_* constants.

result
Variant result [@property getter]
Variant result [@property setter]

A Variant containing the parsed JSON. Use typeof() to check if it is what you expect. For example, if JSON source starts with curly braces ({}) a Dictionary will be returned, if JSON source starts with braces ($(D ]) an [Array) will be returned. iBe aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to float types. Note that JSON objects do not preserve key order like Godot dictionaries, thus you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements:/i

Static functions

_new
JSONParseResult _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta