WeavyContractResolver Class
- Namespace:
- Weavy.Core.Json
- Assembly:
- Weavy.Core.dll
Custom contract resolver that removes empty collections, injects additional properties and uses snake_casing for the property names.
public class WeavyContractResolver : DefaultContractResolver
- Inheritance:
- System.Object → WeavyContractResolver
Constructors
Weavy |
Initializes a new instance of the WeavyContractResolver class. |
Methods
Create |
Adds some json properties when serializing entities. |
Create |
Makes sure empty collections are not serialized. |
Resolve |
Returns the snake_cased name of the property. |
Extension Methods
Is |
Gets a value indicating if the specified value has the default value of the generic type. |
Serialize(Object) | Serializes an object, or graph of connected objects, to a byte array. |
Serialize |
Serializes an object, or graph of connected objects, to a json string. |
Is |
Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type. |