From IT Skills
Jump to: navigation, search

Dictionary[edit | edit source]

Dictionary<int, BasinDem[]> Squares is converted to Squares: { [key: number]: BasinDem[]; } but json is like {Key: ..., Value: Array(...)}

  • workaround
            [DataMember]
            public int[] SquaresKey
            {
                get { return Squares.Keys.ToArray(); } set { }
            }
    
            [DataMember]
            public BasinDem[][] SquaresValue
            {
                get { return Squares.Values.ToArray(); } set { }
            }