C# Class Newtonsoft.Json.JsonSerializer

Serializes and deserializes objects into and from the JSON format. The JsonSerializer enables you to control how objects are encoded into JSON.
Afficher le fichier Open project: neuromat/goalkeeper_restapi Class Usage Examples

Méthodes publiques

Méthode Description
Create ( JsonSerializerSettings settings ) : JsonSerializer

Creates a new JsonSerializer instance using the specified JsonSerializerSettings.

Deserialize ( JsonReader reader ) : object

Deserializes the Json structure contained by the specified JsonReader.

Deserialize ( JsonReader reader, Type objectType ) : object

Deserializes the Json structure contained by the specified JsonReader into an instance of the specified type.

Deserialize ( TextReader reader, Type objectType ) : object

Deserializes the Json structure contained by the specified StringReader into an instance of the specified type.

Deserialize ( JsonReader reader ) : T

Deserializes the Json structure contained by the specified JsonReader into an instance of the specified type.

JsonSerializer ( ) : System

Initializes a new instance of the JsonSerializer class.

Populate ( JsonReader reader, object target ) : void

Populates the JSON values onto the target object.

Populate ( TextReader reader, object target ) : void

Populates the JSON values onto the target object.

Serialize ( JsonWriter jsonWriter, object value ) : void

Serializes the specified Object and writes the Json structure to a Stream using the specified JsonWriter.

Serialize ( TextWriter textWriter, object value ) : void

Serializes the specified Object and writes the Json structure to a Stream using the specified TextWriter.

Private Methods

Méthode Description
DeserializeInternal ( JsonReader reader, Type objectType ) : object
GetMatchingConverter ( IList converters, Type objectType ) : JsonConverter
GetMatchingConverter ( Type type ) : JsonConverter
OnError ( ErrorEventArgs e ) : void
PopulateInternal ( JsonReader reader, object target ) : void
SerializeInternal ( JsonWriter jsonWriter, object value ) : void

Method Details

Create() public static méthode

Creates a new JsonSerializer instance using the specified JsonSerializerSettings.
public static Create ( JsonSerializerSettings settings ) : JsonSerializer
settings JsonSerializerSettings The settings to be applied to the .
Résultat JsonSerializer

Deserialize() public méthode

Deserializes the Json structure contained by the specified JsonReader.
public Deserialize ( JsonReader reader ) : object
reader JsonReader The that contains the JSON structure to deserialize.
Résultat object

Deserialize() public méthode

Deserializes the Json structure contained by the specified JsonReader into an instance of the specified type.
public Deserialize ( JsonReader reader, Type objectType ) : object
reader JsonReader The containing the object.
objectType Type The of object being deserialized.
Résultat object

Deserialize() public méthode

Deserializes the Json structure contained by the specified StringReader into an instance of the specified type.
public Deserialize ( TextReader reader, Type objectType ) : object
reader TextReader The containing the object.
objectType Type The of object being deserialized.
Résultat object

Deserialize() public méthode

Deserializes the Json structure contained by the specified JsonReader into an instance of the specified type.
public Deserialize ( JsonReader reader ) : T
reader JsonReader The containing the object.
Résultat T

JsonSerializer() public méthode

Initializes a new instance of the JsonSerializer class.
public JsonSerializer ( ) : System
Résultat System

Populate() public méthode

Populates the JSON values onto the target object.
public Populate ( JsonReader reader, object target ) : void
reader JsonReader The that contains the JSON structure to reader values from.
target object The target object to populate values onto.
Résultat void

Populate() public méthode

Populates the JSON values onto the target object.
public Populate ( TextReader reader, object target ) : void
reader TextReader The that contains the JSON structure to reader values from.
target object The target object to populate values onto.
Résultat void

Serialize() public méthode

Serializes the specified Object and writes the Json structure to a Stream using the specified JsonWriter.
public Serialize ( JsonWriter jsonWriter, object value ) : void
jsonWriter JsonWriter The used to write the Json structure.
value object The to serialize.
Résultat void

Serialize() public méthode

Serializes the specified Object and writes the Json structure to a Stream using the specified TextWriter.
public Serialize ( TextWriter textWriter, object value ) : void
textWriter TextWriter The used to write the Json structure.
value object The to serialize.
Résultat void