UtilJsonParseJsonTValue(String) Method

Parses a JSON string and returns a DictionaryTKey, TValue representing the JSON key-value pairs, where all the values are casted to the specified 'TValue' type.

Definition

Namespace: DevCase.Core.DataProcessing.Json
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static Dictionary<string, TValue> ParseJson<TValue>(
	string json
)

Parameters

json  String
The JSON string to parse.

Type Parameters

TValue
The type of the values in the dictionary.

Return Value

DictionaryString, TValue
A DictionaryTKey, TValue representing the JSON key-value pairs.

Remarks

This method uses the JavaScriptSerializer class to deserialize the JSON string into a dictionary.

It handles the deserialization process and returns the deserialized object.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also