gameValueToJson: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page creation)
 
m (Add jsonToGameValue to seeAlso)
 
Line 24: Line 24:
</syntaxhighlight>
</syntaxhighlight>


|seealso= [[toString]] [[str]]
|seealso= [[jsonToGameValue]] [[toString]] [[str]] [[parseSimpleArray]]
}}
}}

Latest revision as of 18:38, 7 December 2023

Hover & click on the images for description

Description

Description:
Generate a JSON string from the provided array values.
Groups:
Argo

Syntax

Syntax:
gameValueToJson data
Parameters:
data: Array of Arrays format [[key, value], [key, value], ...]
Return Value:
String - a JSON string or an empty string if data is not an array

Examples

Example 1:
_json = gameValueToJson [["ID", 42], ["Message", "Hello there!"], ["HasHighGround", true]];
result:
{
	"ID": 42,
	"Message": "Hello there!",
	"HasHighGround": true
}

Additional Information

See also:
jsonToGameValue toString str parseSimpleArray

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note