Which Json deserializer renders IList collections?

前端 未结 3 654
别跟我提以往
别跟我提以往 2021-02-06 18:51

I\'m trying to deserialize json to an object model where the collections are represented as IList types.

The actual deserializing is here:

3条回答
  •  被撕碎了的回忆
    2021-02-06 19:28

    Unfortunately you will probably need to fix your class, as there is no way for a deserializer to know that it should be of type IList, since List is an implementation of IList.

    Since the deserializers at http://json.org have source available you could just modify one to do what you want.

提交回复
热议问题