tags:

views:

46

answers:

0

I'd like to serialization a class inherited from Collection and save both the items and the ActivePageIndex, if I use JsonArrayAttribute, I only got the items saved, if I use JsonObjectAttribute, I only got string "(Collection)".

Is there anyway to do it?

[JsonObject(MemberSerialization.OptIn)]
public class Pages : ObservableCollection<String>
{
    //other properties...
    [JsonProperty]
    public int ActivePageIndex;
    //other properties...
}