1 | JsonFx.NET - JSON Serializer
|
---|
2 |
|
---|
3 | The JsonFx.NET JSON parser/serializer functions similarly to the XmlSerializer in .NET
|
---|
4 |
|
---|
5 | Serializes and deserializes any Dictionary<String, T> and IDictionary with
|
---|
6 | String keys directly as a JSON object
|
---|
7 |
|
---|
8 | Serializes and deserializes any List<T>, ArrayList, LinkedList<T>, Queue<T> and
|
---|
9 | many other IEnumerable types directly as JSON arrays
|
---|
10 |
|
---|
11 | Serializes and deserializes DateTime, Enum, Nullable<T>, Guid and other
|
---|
12 | common .NET Types directly as JSON primitives
|
---|
13 |
|
---|
14 | Serializes and deserializes strongly-typed custom classes (similarly to XML
|
---|
15 | Serialization in .NET Framework)
|
---|
16 |
|
---|
17 | Serializes C# 3.0 Anonymous Types directly as JSON objects
|
---|
18 |
|
---|
19 | Serializes C# 3.0 LINQ Queries as JSON arrays of objects (by enumerating the results)
|
---|
20 |
|
---|
21 | Follows Postel's Law ("Be conservative in what you do; be liberal in what you accept from others.")
|
---|
22 | by accepting handling many non-JSON JavaScript concepts:
|
---|
23 | - Common literals such as "Infinity", "NaN", and "undefined"
|
---|
24 | - Ignores block and line comments when deserializing
|
---|
25 |
|
---|
26 | Optional ability to control serialization via attributes/interfaces:
|
---|
27 |
|
---|
28 | JsonFx.Json.IJsonSerializable:
|
---|
29 | Interface which allows classes to control their own JSON serialization
|
---|
30 |
|
---|
31 | JsonFx.Json.JsonIgnoreAttribute:
|
---|
32 | Attribute which designates a property or field to not be serialized
|
---|
33 |
|
---|
34 | System.ComponentModel.DefaultValueAttribute:
|
---|
35 | Member does not serialize if the value matches the DefaultValue attribute
|
---|
36 |
|
---|
37 | JsonFx.Json.JsonNameAttribute:
|
---|
38 | Attribute which specifies the naming to use for a property or field when serializing
|
---|
39 |
|
---|
40 | JsonFx.Json.JsonSpecifiedPropertyAttribute:
|
---|
41 | Attribute which specifies the name of the property which specifies if member should be serialized
|
---|
42 |
|
---|
43 | Optional Type-Hinting improves deserializing to strongly-typed objects
|
---|
44 |
|
---|
45 | JsonFx.Json.JsonWriter.TypeHintName & JsonFx.Json.JsonReader.TypeHintName:
|
---|
46 | Property designates the name of the type hint property (e.g. "__type") and enables type hinting
|
---|
47 |
|
---|
48 | Optional PrettyPrint mode helps with debugging / human-readability
|
---|
49 |
|
---|
50 | JsonFx.Json.JsonWriter.PrettyPrint
|
---|
51 |
|
---|
52 | Optional custom DateTime serialization override
|
---|
53 |
|
---|
54 | JsonFx.Json.JsonWriter.DateTimeSerializer
|
---|