| JsonSerializerSerialize Method (TextWriter, Object, Type) |
Serializes the specified
Object and writes the JSON structure
using the specified
TextWriter.
Namespace:
Newtonsoft.Json
Assembly:
Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 12.0.1+509643a8952ce731e0207710c429ad6e67dc43db
Syntax public void Serialize(
TextWriter textWriter,
Object value,
Type objectType
)
Parameters
- textWriter
- Type: System.IOTextWriter
The TextWriter used to write the JSON structure. - value
- Type: SystemObject
The Object to serialize. - objectType
- Type: SystemType
The type of the value being serialized.
This parameter is used when TypeNameHandling is Auto to write out the type name if the type of the value does not match.
Specifying the type is optional.
See Also