Example #1
0
        protected override bool processJson(JSONNode json)
        {
            Rank = json["rank"];
            Time = json["time"];

            return true;
        }
Example #2
0
        protected override bool processJson(JSONNode json)
        {
            GameName = json["game"];
            Tries = int.Parse(json["tries"]);
            AssetsUrl = json["url"];

            return true;
        }
Example #3
0
 public JSONLazyCreator(JSONNode aNode)
 {
     m_Node = aNode;
     m_Key  = null;
 }
Example #4
0
 public virtual JSONNode Remove(JSONNode aNode) { return aNode; }
Example #5
0
 public override JSONNode Remove(JSONNode aNode)
 {
     try
     {
         var item = m_Dict.Where(k => k.Value == aNode).First();
         m_Dict.Remove(item.Key);
         return aNode;
     }
     catch
     {
         return null;
     }
 }
Example #6
0
 public virtual void Add(JSONNode aItem)
 {
     Add("", aItem);
 }
Example #7
0
 public override void Add(string aKey, JSONNode aItem)
 {
     if (!string.IsNullOrEmpty(aKey))
     {
         if (m_Dict.ContainsKey(aKey))
             m_Dict[aKey] = aItem;
         else
             m_Dict.Add(aKey, aItem);
     }
     else
         m_Dict.Add(Guid.NewGuid().ToString(), aItem);
 }
Example #8
0
 public override void Add (JSONNode aItem)
 {
     var tmp = new JSONArray();
     tmp.Add(aItem);
     Set(tmp);
 }
Example #9
0
 public override void Add(string aKey, JSONNode aItem)
 {
     m_List.Add(aItem);
 }
Example #10
0
 protected abstract bool processJson(JSONNode json);
Example #11
0
 public Response(JSONNode json)
 {
     Ready = json != null && json["success"].AsBool && processJson(json);
 }
Example #12
0
 protected override bool processJson(JSONNode json)
 {
     return true;
 }
Example #13
0
        public CheckoutResponse(JSONNode json) : base(json)
        {

        }
Example #14
0
 public JSONLazyCreator(JSONNode aNode, string aKey)
 {
     m_Node = aNode;
     m_Key = aKey;
 }
Example #15
0
 public override JSONNode Remove(JSONNode aNode)
 {
     m_List.Remove(aNode);
     return aNode;
 }
Example #16
0
 private void Set(JSONNode aVal)
 {
     if (m_Key == null)
     {
         m_Node.Add(aVal);
     }
     else
     {
         m_Node.Add(m_Key, aVal);
     }
     m_Node = null; // Be GC friendly.
 }
Example #17
0
 public virtual void Add(string aKey, JSONNode aItem){ }
Example #18
0
 public override void Add (string aKey, JSONNode aItem)
 {
     var tmp = new JSONClass();
     tmp.Add(aKey, aItem);
     Set(tmp);
 }
Example #19
0
        public ScoreResponse(JSONNode json) : base(json)
        {

        }