Table of Contents

Method ParseJsonString

Namespace
DotNetBrowser.Js
Assembly
DotNetBrowser.dll

ParseJsonString<T>(IFrame, string)

Creates an object that represents the result of parsing the given string in JSON format.

public static T ParseJsonString<T>(this IFrame frame, string jsonString)

Parameters

frame IFrame

The frame to use for conversion.

jsonString string

A string in JSON format.

Returns

T

The result of parsing. Can be null if the result of parsing is null. For example, when the given JSON string is "null", then the method returns null

Type Parameters

T

The expected result type. The following types are supported: bool, double, string, IJsObject, or object.

Exceptions

JsException

The given JSON string object cannot be parsed.

ParseJsonString(IFrame, string)

Creates an object that represents the result of parsing the given string in JSON format.

public static object ParseJsonString(this IFrame frame, string jsonString)

Parameters

frame IFrame

The frame to use for conversion.

jsonString string

A string in JSON format.

Returns

object

The result of parsing. Can be null if the result of parsing is null. For example, when the given JSON string is "null", then the method returns null

Exceptions

JsException

The given JSON string object cannot be parsed.