Show / Hide Table of Contents

Class NamingStrategyJsonSerializer

Json serializer that honours security properties and uses the supplied naming strategy

Inheritance
System.Object
NamingStrategyJsonSerializer
CamelCaseJsonSerializer
DefaultCaseJsonSerializer
SnakeCaseJsonSerializer
Implements
ISerializer
Namespace: FunctionMonkey.Serialization
Assembly: FunctionMonkey.dll
Syntax
public class NamingStrategyJsonSerializer : object, ISerializer

Constructors

| Improve this Doc View Source

NamingStrategyJsonSerializer(NamingStrategy)

Constructor

Declaration
public NamingStrategyJsonSerializer(NamingStrategy namingStrategy)
Parameters
Type Name Description
NamingStrategy namingStrategy
| Improve this Doc View Source

NamingStrategyJsonSerializer(NamingStrategy, IEnumerable<JsonConverter>)

Constructor

Declaration
public NamingStrategyJsonSerializer(NamingStrategy namingStrategy, IEnumerable<JsonConverter> converters)
Parameters
Type Name Description
NamingStrategy namingStrategy
IEnumerable<JsonConverter> converters
| Improve this Doc View Source

NamingStrategyJsonSerializer(NamingStrategy, NamingStrategy)

Constructor

Declaration
public NamingStrategyJsonSerializer(NamingStrategy deserializerNamingStrategy, NamingStrategy serializerNamingStrategy)
Parameters
Type Name Description
NamingStrategy deserializerNamingStrategy

The naming strategy to use for deserialization

NamingStrategy serializerNamingStrategy

The naming strategy to use for serialization

Methods

| Improve this Doc View Source

Deserialize(Type, String, Boolean)

Declaration
public object Deserialize(Type type, string json, bool enforceSecurityProperties = true)
Parameters
Type Name Description
Type type
System.String json
System.Boolean enforceSecurityProperties
Returns
Type Description
System.Object
| Improve this Doc View Source

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.String json

The json

System.Boolean 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

| Improve this Doc View Source

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.Boolean enforceSecurityProperties

True if [SecurityProperty] should be honoured (not serialized)

Returns
Type Description
System.String

The serialized string

Type Parameters
Name Description
TModel

The model type

Implements

ISerializer

Extension Methods

OpenApiFluentValidationHelper.IsNumeric(Object)
OpenApiFluentValidationHelper.NumericToInt(Object)
OpenApiFluentValidationHelper.NumericToDouble(Object)
OpenApiFluentValidationHelper.NumericToDecimal(Object)
  • Improve this Doc
  • View Source
  • 0 Comments
In This Article
  • Constructors
    • NamingStrategyJsonSerializer(NamingStrategy)
    • NamingStrategyJsonSerializer(NamingStrategy, IEnumerable<JsonConverter>)
    • NamingStrategyJsonSerializer(NamingStrategy, NamingStrategy)
  • Methods
    • Deserialize(Type, String, Boolean)
    • Deserialize<TCommand>(String, Boolean)
    • Serialize<TModel>(TModel, Boolean)
  • Implements
  • Extension Methods
Back to top Copyright © 2018 James Randall