private void ReadRESTProperties(JsonReader jReader) { try { BaseIDOObjectItem item = new BaseIDOObjectItem(); jReader.BeginObject(); while (jReader.HasNext) { string name = jReader.NextName(); if (name.Equals("Name")) { item.ItemName = jReader.NextString(); } else if (name.Equals("Value")) { JsonToken peek = jReader.Peek(); if (peek == JsonToken.Null) { jReader.SkipValue(); } else { item.ItemValue = jReader.NextString(); } } else { jReader.SkipValue(); } } jReader.EndObject(); iResult.Objects.Last().ObjectItems.Add(item); } catch (Exception Ex) { throw Ex; } }
private void ReadSOAPPropertiesArray(JsonReader jReader, ref BaseIDOObject col) { jReader.BeginArray(); while (jReader.HasNext) { BaseIDOObjectItem propertyValues = new BaseIDOObjectItem(); jReader.BeginObject(); while (jReader.HasNext) { string name = jReader.NextName(); if (name.Equals("Property")) { JsonToken peek = jReader.Peek(); if (peek == JsonToken.Null) { jReader.SkipValue(); } else { propertyValues.ItemValue = jReader.NextString(); } } else if (name.Equals("Updated")) { propertyValues.Updated = jReader.NextBoolean(); } else { jReader.SkipValue(); } } jReader.EndObject(); col.ObjectItems.Add(propertyValues); } jReader.EndArray(); }