Small and fast JSON library for .NET 2.0+/SL4+/WP7+/Windows Store Apps/Portable Class Library and powershell. Includes support for dynamic in .NET 4.0+/SL4+/Windows Store Apps. Also includes support for DataContract and DataMember.
SimpleJson is not distributed as a compiled binary .dll file but rather as a single .cs file or a powershell module .psm1.
Use nuget to add SimpleJson.cs file to your project.
Install-Package SimpleJson
Note: By default SimpleJson expects System.Linq
. If you are targeting older version of .NET framework (.net < 3.0 or WP7.0) you will need to add #define SIMPLE_JSON_NO_LINQ_EXPRESSION
.
If you want to use [DataContract]
, [DataMember(Name = "name")]
or [IgnoreDataMember]
make sure to add #define SIMPLE_JSON_DATACONTRACT
.
If you want to use IReadOnlyCollection<T>
and IReadOnlyList<T>
make sure to add #define SIMPLE_JSON_READONLY_COLLECTIONS
.