Is there Any Off-The-Shelf Json Serialization helper class in .NET BCL?

后端 未结 6 635
庸人自扰
庸人自扰 2020-12-17 10:22

I need to serialize/de-serialize some objects into/from string and transfer them as just opaque data. I can use XmlSerializer to do it, but generated string looks clumsy and

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-17 10:54

    JsonFx.NET has an open-source serializer which allows serialization to/from strongly typed classes which might be what you're looking for. You can control how dates are serialized and override many aspects of the serialization. It even interacts well with Linq by supporting serialization of anonymous objects. The API works just like .NET XML serialization.

提交回复
热议问题