JsonValue.Load Method (TextReader)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Deserializes text-based JSON from a text reader into a JSON CLR type.

Namespace:  System.Json
Assembly:  System.Json (in System.Json.dll)

Syntax

'Declaration
Public Shared Function Load ( _
    textReader As TextReader _
) As JsonValue
public static JsonValue Load(
    TextReader textReader
)

Parameters

Return Value

Type: System.Json.JsonValue
Returns a class derived from JsonValue that contains the deserialized text-based JSON.

Exceptions

Exception Condition
ArgumentNullException

textReader is nulla null reference (Nothing in Visual Basic).

Remarks

The text-based JSON is cast into JsonPrimitive, JsonArray, or JsonObject depending on the text-based JSON supplied to the method.

Note that this method is static and can be called on any text-based JSON content and cast to the appropriate JSON type automatically.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

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