public string ToJson(bool _pretty = false)
        {
            fsData _fsres = RaqnSerializer.TryGetSerializable <RaqnResponse>(this);

            //return _fsres.ToString();
            if (_pretty)
            {
                return(fsJsonPrinter.PrettyJson(_fsres));
            }
            return(fsJsonPrinter.CompressedJson(_fsres));
        }
Example #2
0
        public bool SetField <T>(string _field_key, T _field_value)
        {
            RaqnSerializer.JsonSerialize(_field_value);
            fsData _field = RaqnSerializer.TryGetSerializable <T>(_field_value);

            if (_field.IsNull)
            {
                return(false);
            }
            body.Add(_field_key, _field);
            return(true);
        }
Example #3
0
 void DebugPrintVars()
 {
     //Este metodo debuggea las variables de sesiĆ³n
     Debug.Log("Printing Raqn Vars");
     Debug.Log("DixInfo = " + RaqnSerializer.JsonSerialize(Dix, true));
     Debug.Log("ApiUser = "******"ApiSession = " + RaqnSerializer.JsonSerialize(ApiSession, true));
     Debug.Log("GameData = " + RaqnSerializer.JsonSerialize(GameData, true));
     if (License != null)
     {
         Debug.Log("License = " + RaqnSerializer.JsonSerialize(License, true));
     }
 }
Example #4
0
        public static DixInfo Load()
        {
            TextAsset _dixtext = Resources.Load("RAQN/dix") as TextAsset;
            DixInfo   _dix     = null;

            if (_dixtext != null)
            {
                _dix = RaqnSerializer.JsonDeserialize <DixInfo>(_dixtext.text);
            }
            if (_dix == null)
            {
                Debug.Log("Cannot Load DixInfo.json!");
                Raqn.Quit();
            }
            return(_dix);
        }
 static public T FromJson <T>(string _json) where T : RaqnStorable, new()
 {
     return(RaqnSerializer.JsonDeserialize <T>(_json));
 }
 public string ToJson(bool _pretty = false)
 {
     return(RaqnSerializer.JsonSerialize(this, _pretty));
 }
Example #7
0
 public override string ToString()
 {
     return(base.ToString() + " " + RaqnSerializer.JsonSerialize(this, true));
 }