Beispiel #1
0
 public void AppendField(string name, object data, TypeInfo type)
 {
     //throw new NotImplementedException();
     json.WritePropertyName(name);
     var val = data is Guid  ? data.ToString()
                             : JavaScriptConvert.ToString(data);
     serializer.Serialize(json, data);
 }
Beispiel #2
0
        public void Start(Mubble.Data.IData data, TypeInfo type)
        {
            json.WriteStartObject();
            //json.WritePropertyName("type");

            //json.WriteValue(type.Name);

            closings.Push(json.WriteEndObject);
        }
Beispiel #3
0
 public void StartRelated(string name, Mubble.Data.IData data, TypeInfo type)
 {
     var c = new XElement("related",
                 new XAttribute("name", name),
                 new XAttribute("type", type.Name)
                 );
     current.Add(c);
     current = c;
 }
Beispiel #4
0
 public void AppendField(string field, object data, TypeInfo type)
 {
     current.Add(
         new XElement(
             "field",
             new XAttribute("name", field),
             new XAttribute("type", type.Name)
             )
     );
 }
Beispiel #5
0
 public void StartRelated(string name, IData data, TypeInfo type)
 {
     json.WritePropertyName(name);
     json.WriteStartObject();
     closings.Push(json.WriteEndObject);
 }
Beispiel #6
0
 public void Start(Mubble.Data.IData data, TypeInfo type)
 {
     root.Add(new XAttribute("type", type.Name));
 }