Content


NTL
Core
json_decode

json_decode



Convert json encoded string into Variant or Variable . Using Variable is preferable.

If error listener is passed as argument error_listener value, its method NotifyOnError() will be called in case if specified string source cannot be successfully decoded. Possible error codes are defined as script::ERROR_* constants of the Script module.

If progress listener is passed as argument progress_listener value, its method NotifyOnProgress() will be called each time some progress is made. You can use its abort argument to abort decoding if needed.

bool json_decode(const String &source, Variant &target, IErrorListener *error_listener = nullptr, script::IProgressListener *progress_listener = nullptr);
bool json_decode(const String &source, script::Variable &target, IErrorListener *error_listener = nullptr, script::IProgressListener *progress_listener = nullptr);
Namespace: nitisa
Include: Nitisa/Core/Json.h