JsonObject.Parse method

Applies to Windows and Windows Phone

Parses the specified JSON string that represents a JsonObject into a JSON value.

Note  This will throw an exception if the provided JSON string is not valid. Use of JsonObject.TryParse is a recommended alternative. A TryParse call will return a boolean value to indicate success or failure and, if successful, the resultant JsonObject.


Public Shared Function Parse(
  input As String 
) As JsonObject



Type: System.String [.NET] | Platform::String [C++]

The specified JSON string.

Return value


This method may only be called when the ValueType is Null. If the value contained in the specified JSON string is a String, a Number or a Boolean, the ValueType will be updated and the actual value can then be accessed through the GetString, GetNumber or GetBoolean methods. If Parse fails due to an invalid JSON string or resource allocation errors, the ValueType will not be changed.

When implemented on the subclass JsonObject, this method requires the specified input string to be a valid JSON object value. When implemented on the subclass JsonArray, this method requires the specified input string to be a valid JSON array value. The original object state will be overwritten when JsonObject.Parse or JsonArray.Parse succeeds. If Parse fails, the object state remains intact.


Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]


Windows::Data::Json [C++]



See also




© 2014 Microsoft. All rights reserved.