Exemplo n.º 1
0
        private void writeObject(JSONArray array, DataRow row)
        {
            var obj = new JSONObject();

            foreach (Field field in _fields)
            {
                field.Write(obj, row);
            }

            array.AddObject(obj);
        }
Exemplo n.º 2
0
 public void Write(JSONObject target, DataRow row)
 {
     if (row.IsNull(_index))
     {
         target.AddNull(_name);
     }
     else
     {
         writeProperty(_name, row[_index], target);
     }
 }
Exemplo n.º 3
0
 protected virtual void writeProperty(string name, object rawValue, JSONObject target)
 {
     target.AddString(name, rawValue.ToString().Replace("\n", "~~~").Replace("\r", ""));
 }
Exemplo n.º 4
0
 protected override void writeProperty(string name, object rawValue, JSONObject target)
 {
     target.AddDate(name, (DateTime) rawValue);
 }