I get the json string in my server. The json string too long. I use “JSONNode.Parse(json)” that function is loading too long. Use about 30 seconds.
public IEnumerator response() {
WWWForm form = new WWWForm();
form.AddField("data", json);
Dictionary<string,string> headers = new Dictionary<string, string>();
headers.Add("Content-Type", "application/json");
WWW w = new WWW(url, form);
yield return w;
if(w.error == null) {
if(JSONNode.Parse(w.text) != null) { // This load too long
if(JSONNode.Parse(w.text).contain("message")) { // This load too long
var message = Decrypt(JSONNode.Parse(w.text)["message"]); // This load too long
var data = JSONNode.Parse(message);// This load too long
}
}
Debug.Log(data);
else {
Debug.Log("Fail:" + w.error);
}
}
How can I performance?