JavaScriptSerializer.DeserializeObject(String) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts the specified JSON string to an object graph.
public:
System::Object ^ DeserializeObject(System::String ^ input);
public object DeserializeObject(string input);
member this.DeserializeObject : string -> obj
Public Function DeserializeObject (input As String) As Object
- input
- String
The JSON string to be deserialized.
The deserialized object.
input
is null
.
The input
length exceeds the value of MaxJsonLength.
-or-
The recursion limit defined by RecursionLimit was exceeded.
-or-
input
contains an unexpected character sequence.
-or-
input
is a dictionary type and a non-string key value was encountered.
-or-
input
includes member definitions that are not available on the target type.
input
contains a "__type" property that indicates a custom type, but the type resolver that is currently associated with the serializer cannot find a corresponding managed type.
-or-
input
contains a "__type" property that indicates a custom type, but the result of deserializing the corresponding JSON string cannot be assigned to the expected target type.
-or-
input
contains a "__type" property that indicates either Object or a non-instantiable type (for example, an abstract type or an interface).
-or-
An attempt was made to convert a JSON array to an array-like managed type that is not supported for use as a JSON deserialization target.
-or-
It is not possible to convert input
to the target type.
This deserialization method does not try to cast the root of the object graph to a specific type, as with the Deserialize method.
Продукт | Версии |
---|---|
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Обратна връзка за .NET
.NET е проект с отворен код. Изберете връзка, за да предоставите обратна връзка: