public void Send(j_typed data) { if (!data.IsValid()) { Debug.LogWarning($"Data isn't valid: {JsonManager.Serialize(data)}"); return; } Send(JsonManager.Serialize(data)); }
private void Update() { if (!EventQueue.IsEmpty) { if (EventQueue.TryDequeue(out string result)) { //Debug.Log("Will Try " + result + "|||"); j_typed response = JsonManager.Deserialize(result); Debug.Log("Try " + result + "|||" + JsonManager.Serialize(response)); response.Execute(); } } }
public static string Serialize(j_typed typed) { return(JsonConvert.SerializeObject(typed, Converter)); }