Skip to content

Run JSON Command

Run JSON Command

Deserializes a JSON string into a command and executes it at runtime for dynamic command construction.

Properties

System

Name Explanation Type
JSON Command The JSON string to deserialize into a command and executes at runtime. Variable or Value

Examples

Run a JSON Command from a String Literal

Deserializes and executes a command from a JSON string at runtime.

run_json("{}");
{"Data":{"JsonCommand":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"{}","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.System.RunJsonCommand"}

Run a JSON Command from a Variable

Deserializes and executes a command stored as a JSON string in global variable 0.

run_json($gv[0]);
{"Data":{"JsonCommand":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.System.RunJsonCommand"}