Ejemplo n.º 1
0
        public override object ReadJson(JsonReader reader,
                                        Type objectType,
                                        object existingValue,
                                        JsonSerializer serializer)
        {
            var arr = JArray.Load(reader);

            var qc = new QuestionCollection();

            foreach (JObject item in arr)
            {
                qc.Add(item.ToObject <Question>());
            }

            return(qc);
        }
Ejemplo n.º 2
0
 public Form()
 {
     Header    = new FieldBlock(this);
     Questions = new QuestionCollection(this);
     Footer    = new FieldBlock(this);
 }