Extension method to string that deserializes a json string into a specific type. Note that the type specified must be serializable.

Namespace: DotNetNuke.Common.Utilities
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public static Object FromJson(
	this string json,
	Type type
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function FromJson ( 
	json As String,
	type As Type
) As Object

Parameters

json
Type: System..::..String
paramjsonM:DotNetNuke.Common.Utilities.JsonExtensionsWeb.FromJson(System.String,System.Type)
type
Type: System..::..Type
paramtypeM:DotNetNuke.Common.Utilities.JsonExtensionsWeb.FromJson(System.String,System.Type)

Return Value

returnsM:DotNetNuke.Common.Utilities.JsonExtensionsWeb.FromJson(System.String,System.Type)

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see [b8020aae-374d-46a9-bcb7-8cc2390b93b6] or [175ce3ff-9bbf-4e64-8421-faeb81a0bb51].

See Also