CBA_fnc_encodeJSON

Description

Serializes input to a JSON string.  Can handle

  • ARRAY
  • BOOL
  • CONTROL
  • GROUP
  • LOCATION
  • NAMESPACE
  • NIL (ANY)
  • NUMBER
  • OBJECT
  • STRING
  • TASK
  • TEAM_MEMBER
  • HASHMAP
  • Everything else will simply be stringified.

Parameters

_objectObject to serialize.  <ARRAY, ...>

Returns

_jsonJSON string containing serialized object.

Examples

private _settings = call CBA_fnc_createNamespace;
_settings setVariable ["enabled", true];
private _json = [_settings] call CBA_fnc_encodeJSON;

Author

BaerMitUmlaut

Close