Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

JsonReaderWriterFactory.CreateJsonWriter Method (Stream)

Creates an XmlDictionaryWriter that writes data encoded with JSON to a stream using a UTF-8 character encoding.

Namespace:  System.Runtime.Serialization.Json
Assembly:  System.Runtime.Serialization.Json (in System.Runtime.Serialization.Json.dll)
public static XmlDictionaryWriter CreateJsonWriter(
	Stream stream
)

Parameters

stream
Type: System.IO.Stream
The output Stream for the JSON writer.

Return Value

Type: System.Xml.XmlDictionaryWriter
An XmlDictionaryWriter that writes data encoded with JSON to the stream from an XML Infoset.
ExceptionCondition
ArgumentNullException

stream is null.

The default character encoding used here is UTF-8. If you want to specify a different character encoding, use one of the other two overloads for this method.

When the writer is closed, the stream is closed by this overload as well. If you do not want the stream to be closed by the writer when it is done, then use the CreateJsonWriter(Stream, Encoding, Boolean) overload where this behavior can be specified.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.