CBA_fnc_parseJSON

Description

Deserializes a JSON string.

Parameters

_jsonString containing valid JSON.  STRING
_useHashesOutput CBA hashes instead of namespaces (optional, default: false) <BOOLEAN>

Returns

_objectThe deserialized JSON object or nil if JSON is invalid.  <LOCATION, ARRAY, STRING, NUMBER, BOOL, NIL>

Examples

private _json = "{ ""enabled"": true }";
private _settings = [_json] call CBA_fnc_parseJSON;
private _enabled = _settings getVariable "enabled";

loadFile "data\config.json" call CBA_fnc_parseJSON
[preprocessFile "data\config.json", true] call CBA_fnc_parseJSON

Author

BaerMitUmlaut

string used by format
Close