问题
I'm running a light webserver using .Net Microframework and I was wondering what libraries would work well for for mainly JSON serialization, but possibly deserialization as well.
Problem I've found with a lot of JSON libraries is they use fancy .Net features not available in MF, and are more complicated then what I need.
I could easily write a simple library to accomplish my tasks but I was wondering if anything else was available.
Thanks
回答1:
There is a lightweight JSON parser in the NetduinoHelpers library that is specifically built to minimize footprint: http://netduinohelpers.codeplex.com/
回答2:
Mike Jones uploaded a JSON Serialization and Deserialization library for the .NET Micro Framework.
This is a JSON (de)serialization library that can encode (nearly) any C# object into a JSON string, and back. It manages primitives (int, float, string), dates, objects (classes, arrays, dictionaries), and objects within objects (within objects, etc).
...
I recall, it's about 13k in size, so it's kinda big, and kinda slow, but it works.
回答3:
Not sure if you've tried Json.NET as it has solution files for Silverlight and WindowsPhone. The implication being that if it works in restricted environments like those it may work in the .NET Microframework.
来源:https://stackoverflow.com/questions/5121915/json-library-for-net-microframework