Skip to main content
Version: 5.11.4

Parse

static public Param Parse(string jsonString);
static public Param Parse(LitJson.JsonData jsonData);
static public Param Parse(T value);

Parameters

Variable NameData TypeDescription
jsonStringstringParses the string data stored as JSON format into the Param format.
jsonDataJsonDataParses jsonData data into the Param format.
valueT(reference type generic)Parses the class declared by the developer into the Param format.

Private variables in the class are not included when parsing.
Among private variables, the value to be added to param can be set by inserting it as a (property).

Description

Converts the data stored in a specific format to Param.
When converting a class to Param, consider the precautions for the above parameter.

Example

LitJson.JsonData json = new JsonData();
...
Param param = Param.Parse(json);

Exception case

When there is an attempt to convert empty data to Param
Exception type : ParseException
Exception message : In order to convert JObject to Param, it must have a child value.

When there is an attempt to convert the JSON data without a child to Param
Exception type : ParseException
Exception message : In order to convert JObject to Param, it must have a child value.