Useful JSON converters and helpers.
Install via nuget
install-package Archon.Json
install-package Archon.Json.Enums
The following converters and utilities can be found in the Archon.Json
namespace. For a primer on how to use these JSON converters and resolvers, see the Json.Net documentation.
See here for why this class is necessary. It camel cases property names for types only within the assembly you specify.
This converter converts any Lazy<T>
thing to the actual T
. E.g., an object with a Lazy<string>
property on it would have that property be serialized as a normal string
with this converter.
It does what you think it does. It trims strings when serializing and deserializing.
It converts the given object to a string and vice versa (using any registered TypeConverter
s).
It uses the Archon Enum Utils library to convert enums to their description representation and vice versa. Make sure to install the Archon.Json.Enums
package.
It uses the Archon Enum Utils library to convert enums to an object containing their original value and their description. Make sure to install the Archon.Json.Enums
package.