Class NamingStrategyJsonSerializer
Json serializer that honours security properties and uses the supplied naming strategy
Inheritance
System.Object
NamingStrategyJsonSerializer
Implements
Namespace: FunctionMonkey.Serialization
Assembly: FunctionMonkey.dll
Syntax
public class NamingStrategyJsonSerializer : object, ISerializer
Constructors
| Improve this Doc View SourceNamingStrategyJsonSerializer(NamingStrategy)
Constructor
Declaration
public NamingStrategyJsonSerializer(NamingStrategy namingStrategy)
Parameters
Type | Name | Description |
---|---|---|
Naming |
namingStrategy |
NamingStrategyJsonSerializer(NamingStrategy, IEnumerable<JsonConverter>)
Constructor
Declaration
public NamingStrategyJsonSerializer(NamingStrategy namingStrategy, IEnumerable<JsonConverter> converters)
Parameters
Type | Name | Description |
---|---|---|
Naming |
namingStrategy | |
IEnumerable<Json |
converters |
NamingStrategyJsonSerializer(NamingStrategy, NamingStrategy)
Constructor
Declaration
public NamingStrategyJsonSerializer(NamingStrategy deserializerNamingStrategy, NamingStrategy serializerNamingStrategy)
Parameters
Type | Name | Description |
---|---|---|
Naming |
deserializerNamingStrategy | The naming strategy to use for deserialization |
Naming |
serializerNamingStrategy | The naming strategy to use for serialization |
Methods
| Improve this Doc View SourceDeserialize(Type, String, Boolean)
Declaration
public object Deserialize(Type type, string json, bool enforceSecurityProperties = true)
Parameters
Type | Name | Description |
---|---|---|
Type | type | |
System. |
json | |
System. |
enforceSecurityProperties |
Returns
Type | Description |
---|---|
System. |
Deserialize<TCommand>(String, Boolean)
Deserialize the command from the supplied json
Declaration
public TCommand Deserialize<TCommand>(string json, bool enforceSecurityProperties)
Parameters
Type | Name | Description |
---|---|---|
System. |
json | The json |
System. |
enforceSecurityProperties | True if [SecurityProperty] should be honoured (not used in deserializtion) |
Returns
Type | Description |
---|---|
TCommand | The deserialized object |
Type Parameters
Name | Description |
---|---|
TCommand | The type |
Serialize<TModel>(TModel, Boolean)
Serialize the object
Declaration
public string Serialize<TModel>(TModel value, bool enforceSecurityProperties = true)
Parameters
Type | Name | Description |
---|---|---|
TModel | value | The value to serialize |
System. |
enforceSecurityProperties | True if [SecurityProperty] should be honoured (not serialized) |
Returns
Type | Description |
---|---|
System. |
The serialized string |
Type Parameters
Name | Description |
---|---|
TModel | The model type |