Fastest serializer and deserializer with lowest memory footprint in C#?

后端 未结 4 1375
Happy的楠姐
Happy的楠姐 2020-12-13 15:32

I am currently using the binary formatter (Remoting) to serialize and deserialize objects for sending around my LAN.

I have recently upgraded from 2.0 to .NET 3.5. H

4条回答
  •  误落风尘
    2020-12-13 15:54

    In the performance comparison linked by @Luke, notice that DataContractJsonSerializer performs very well compared to the other MS serializers.

    Given the ubiquity of JSON, and the ease of which you can use DataContractJsonSerializer, I don't see much reason to use "protocol buffers". JSON will be easier to debug when bouncing between languages and platforms, and it will compress beautifully.

    (I love how Google takes CS 101 concepts and becomes famous for implementing them. In C, we call "protocol buffer" "struct"s. They work great.)

提交回复
热议问题