C# Class JP.Utils.Data.Json.JsonParser

Afficher le fichier Open project: JuniperPhoton/JP.Utils.UWP

Méthodes publiques

Méthode Description
GetBooleanFromJsonObj ( IJsonValue obj, string propertyName, bool defaultValue = false ) : bool
GetJsonArrayFromJsonObj ( IJsonValue obj, string propertyName ) : JsonArray
GetJsonObjFromJsonObj ( IJsonValue obj, string propertyName ) : JsonObject
GetNullableNumberFromJsonObj ( IJsonValue obj, string propertyName, double defaultValue = null ) : double?
GetNumberFromJsonObj ( IJsonValue obj, string propertyName, double defaultValue ) : double
GetStringFromJsonObj ( IJsonValue obj, string propertyName, string defaultValue = null ) : string

Usage : like var token = JsonParser.GetStringFromJsonObj(json, "token");

Method Details

GetBooleanFromJsonObj() public static méthode

public static GetBooleanFromJsonObj ( IJsonValue obj, string propertyName, bool defaultValue = false ) : bool
obj IJsonValue
propertyName string
defaultValue bool
Résultat bool

GetJsonArrayFromJsonObj() public static méthode

public static GetJsonArrayFromJsonObj ( IJsonValue obj, string propertyName ) : JsonArray
obj IJsonValue
propertyName string
Résultat JsonArray

GetJsonObjFromJsonObj() public static méthode

public static GetJsonObjFromJsonObj ( IJsonValue obj, string propertyName ) : JsonObject
obj IJsonValue
propertyName string
Résultat JsonObject

GetNullableNumberFromJsonObj() public static méthode

public static GetNullableNumberFromJsonObj ( IJsonValue obj, string propertyName, double defaultValue = null ) : double?
obj IJsonValue
propertyName string
defaultValue double
Résultat double?

GetNumberFromJsonObj() public static méthode

public static GetNumberFromJsonObj ( IJsonValue obj, string propertyName, double defaultValue ) : double
obj IJsonValue
propertyName string
defaultValue double
Résultat double

GetStringFromJsonObj() public static méthode

Usage : like var token = JsonParser.GetStringFromJsonObj(json, "token");
public static GetStringFromJsonObj ( IJsonValue obj, string propertyName, string defaultValue = null ) : string
obj IJsonValue
propertyName string
defaultValue string
Résultat string