C# Class Nancy.Json.Simple.NancySerializationStrategy

Nancy serialization stategy for SimpleJson
Inheritance: PocoJsonSerializerStrategy
Afficher le fichier Open project: thecodejunkie/Nancy

Méthodes publiques

Méthode Description
DeserializeObject ( object value, Type type ) : object

Deserialize an object

NancySerializationStrategy ( ) : System

Initializes a new instance of the NancySerializationStrategy class.

C# casing of objects will be defaulted to camelCase

NancySerializationStrategy ( bool retainCasing ) : System

Initializes a new instance of the NancySerializationStrategy class.

RegisterConverters ( IEnumerable javaScriptConverters ) : void

Register custom JavaScriptConverter converters

RegisterConverters ( IEnumerable javaScriptPrimitiveConverters ) : void

Register custom JavaScriptPrimitiveConverter

Méthodes protégées

Méthode Description
MapClrMemberNameToJsonFieldName ( string clrPropertyName ) : string

Formats a property name to a JSON field name

TrySerializeKnownTypes ( object input, object &output ) : bool

Serialize an object

Private Methods

Méthode Description
FindJavaScriptConverter ( Type inputType ) : JavaScriptConverter
FindPrimitiveConverter ( Type inputType ) : JavaScriptPrimitiveConverter
SerializeDateTime ( System.DateTime input, object &output ) : bool
TrySerializeJavaScriptConverter ( object input, object &output, Type inputType ) : bool
TrySerializePrimitiveConverter ( object input, object &output, Type inputType ) : bool

Method Details

DeserializeObject() public méthode

Deserialize an object
public DeserializeObject ( object value, Type type ) : object
value object The object to deserialize
type System.Type The type of object to deserialize
Résultat object

MapClrMemberNameToJsonFieldName() protected méthode

Formats a property name to a JSON field name
protected MapClrMemberNameToJsonFieldName ( string clrPropertyName ) : string
clrPropertyName string The property name to format
Résultat string

NancySerializationStrategy() public méthode

Initializes a new instance of the NancySerializationStrategy class.
C# casing of objects will be defaulted to camelCase
public NancySerializationStrategy ( ) : System
Résultat System

NancySerializationStrategy() public méthode

Initializes a new instance of the NancySerializationStrategy class.
public NancySerializationStrategy ( bool retainCasing ) : System
retainCasing bool Retain C# casing of objects when serialized
Résultat System

RegisterConverters() public méthode

Register custom JavaScriptConverter converters
public RegisterConverters ( IEnumerable javaScriptConverters ) : void
javaScriptConverters IEnumerable An array of
Résultat void

RegisterConverters() public méthode

Register custom JavaScriptPrimitiveConverter
public RegisterConverters ( IEnumerable javaScriptPrimitiveConverters ) : void
javaScriptPrimitiveConverters IEnumerable An array of
Résultat void

TrySerializeKnownTypes() protected méthode

Serialize an object
protected TrySerializeKnownTypes ( object input, object &output ) : bool
input object The object to serialize
output object The serialized object
Résultat bool