public override void JsonToEntity(RequestResult result, BaseEntity entity)
 {
     base.JsonToEntity(result, entity);
     JObject jobject = JObject.Parse(base.GetResponseData());
     ((Relationship)entity).SetVertices(jobject["start"].ToString(), jobject["end"].ToString());
     ((Relationship)entity).SetType(jobject["type"].ToString());
 }
Beispiel #2
0
        public virtual void JsonToEntity(RequestResult result, BaseEntity entity)
        {
            _responseData = result.GetResponseData();
            JObject jobject = JObject.Parse(_responseData);
            JToken token;
            jobject.TryGetValue("data", out token);
            var dataKeys = from p in jobject["data"] select p;

            IList<string> keys = jobject.Properties().Select(p => p.Name).ToList();
            foreach (var t in token)
            {
                string[] s = t.ToString().Replace("\"", "").Split(":".ToCharArray());
                this._keyValuePair.Add(s[0].Trim(), s[1].Trim());
            }
            entity.SetLocation(new Uri(jobject["self"].ToString()));
        }
Beispiel #3
0
 public override void JsonToEntity(RequestResult result, BaseEntity entity)
 {
     base.JsonToEntity(result, entity);
 }