I wanted to send a JSON document in form of a JArray (serialized List) from Unity to Cloud Code.
Unfortunately, the method.
var list = new List<int>(){1,2}; var jsonString = JsonConvert.Serialize(list); var req = GSRequestData(jsonString);
returns an empty object
{}
One workaround was to nest the List into another object.
var jObj = new JObject(); jObj.Add("List", lis); var req = new GSRequestData(jObj);
results in the correct output
{"List":[1,2]}
I would suggest that you either change GSRequestData or add GSRequestDataList.
It would be great to actually receive an answer from the support.
Hi Heiko,
Apologies for the delayed response. We'll raise this with the SDK team for you.
Regards,
Liam
Heiko Holz
I wanted to send a JSON document in form of a JArray (serialized List) from Unity to Cloud Code.
Unfortunately, the method.
returns an empty object
One workaround was to nest the List into another object.
results in the correct output
I would suggest that you either change GSRequestData or add GSRequestDataList.
1 person has this problem