This class defines utilities to simplify the process of serializing and deserializing Json.
More... |
static string | ConvertDictionaryOfStringsToJsonString (Dictionary< string, string > dictionaryOfStrings) |
| This method creates a Json string representation of a dictionary of strings. More...
|
|
static string | ConvertDictionaryToJsonString< TKey, TValue > (Dictionary< TKey, TValue > genericDictionary) |
| Generic method that creates a Json string representation of a dictionary with any type. More...
|
|
static string | ConvertArrayOfStringsToJsonString (List< string > listOfStrings) |
| This method creates a Json string representation of a list of strings. More...
|
|
static string | ConvertObjectToJsonString (System.Object objectToSerialize) |
| This method creates a Json string representation of an object. More...
|
|
static TKey[] | GetDictionaryKeysAsArray< TKey, TValue > (Dictionary< TKey, TValue > genericDictionary) |
| This method returns the keys of a dictionary as an array. More...
|
|
static TValue[] | GetDictionaryValuesAsArray< TKey, TValue > (Dictionary< TKey, TValue > genericDictionary) |
| This method returns the values of a dictionary as an array. More...
|
|
static Dictionary< TKey, TValue > | GetDictionaryFromKeyValueArrays< TKey, TValue > (TKey[] keys, TValue[] values) |
| This method constructs a dictionary from an array of keys and an array of values. More...
|
|
static Dictionary< string, string > | ConvertJsonToDictionary (string json) |
| This method deserializes a Json string into a flat dictionary. More...
|
|
static Dictionary< string, object > | ConvertJsonToNestedDictionary (string json) |
| This method deserializes a Json string into a nested dictionary. More...
|
|
static string | DecryptBase64Json (string base64String) |
| This method decrypts a string in base 64 format. More...
|
|
This class defines utilities to simplify the process of serializing and deserializing Json.
◆ ConvertArrayOfStringsToJsonString()
static string BFGSDK.UnityWrapperUtilities.ConvertArrayOfStringsToJsonString | ( | List< string > | listOfStrings | ) | |
| inlinestatic |
This method creates a Json string representation of a list of strings.
- Parameters
listOfStrings | A list of strings. |
- Returns
- A Json representation of the given list.
◆ ConvertDictionaryOfStringsToJsonString()
static string BFGSDK.UnityWrapperUtilities.ConvertDictionaryOfStringsToJsonString | ( | Dictionary< string, string > | dictionaryOfStrings | ) | |
| inlinestatic |
This method creates a Json string representation of a dictionary of strings.
- Parameters
dictionaryOfStrings | A dictionary with keys and values as strings. |
- Returns
- A Json string representing the given dictionary.
◆ ConvertDictionaryToJsonString< TKey, TValue >()
static string BFGSDK.UnityWrapperUtilities.ConvertDictionaryToJsonString< TKey, TValue > | ( | Dictionary< TKey, TValue > | genericDictionary | ) | |
| inlinestatic |
Generic method that creates a Json string representation of a dictionary with any type.
- Template Parameters
TKey | The type for the key entries of the dictionary. |
TValue | The type for the value entries of the dictionary. |
- Parameters
genericDictionary | A dictionary with generic keys and values. |
- Returns
- A Json string representation of the given dictionary.
◆ ConvertJsonToDictionary()
static Dictionary< string, string > BFGSDK.UnityWrapperUtilities.ConvertJsonToDictionary | ( | string | json | ) | |
| inlinestatic |
This method deserializes a Json string into a flat dictionary.
- Parameters
json | A Json string to be deserialized that contains a flat dictionary structure of keys and values. |
- Returns
- A dictionary created from the given Json string.
◆ ConvertJsonToNestedDictionary()
static Dictionary< string, object > BFGSDK.UnityWrapperUtilities.ConvertJsonToNestedDictionary | ( | string | json | ) | |
| inlinestatic |
This method deserializes a Json string into a nested dictionary.
- Parameters
json | A Json string to be deserialized that contains a complex dictionary structure with nested dictionaries. |
- Returns
- A dictionary created from the given Json string.
◆ ConvertObjectToJsonString()
static string BFGSDK.UnityWrapperUtilities.ConvertObjectToJsonString | ( | System.Object | objectToSerialize | ) | |
| inlinestatic |
This method creates a Json string representation of an object.
- Parameters
objectToSerialize | The object to be serialized. |
- Returns
- A Json string representation of the given object.
◆ DecryptBase64Json()
static string BFGSDK.UnityWrapperUtilities.DecryptBase64Json | ( | string | base64String | ) | |
| inlinestatic |
This method decrypts a string in base 64 format.
- Parameters
base64String | A string encripted in base 64 format. |
- Returns
- The decrypted string obtained from the given base 64 string.
◆ GetDictionaryFromKeyValueArrays< TKey, TValue >()
static Dictionary< TKey, TValue > BFGSDK.UnityWrapperUtilities.GetDictionaryFromKeyValueArrays< TKey, TValue > | ( | TKey[] | keys, | | | TValue[] | values | | ) | | |
| inlinestatic |
This method constructs a dictionary from an array of keys and an array of values.
- Template Parameters
TKey | Generic type of the keys. |
TValue | Generic type of the values. |
- Parameters
keys | An array of keys. |
values | An array of values. |
- Returns
- A dictionary created from the keys and values given arrays.
◆ GetDictionaryKeysAsArray< TKey, TValue >()
static TKey[] BFGSDK.UnityWrapperUtilities.GetDictionaryKeysAsArray< TKey, TValue > | ( | Dictionary< TKey, TValue > | genericDictionary | ) | |
| inlinestatic |
This method returns the keys of a dictionary as an array.
- Template Parameters
TKey | Generic type for the keys of the dictionary. |
TValue | Generic type for the values of the dictionary. |
- Parameters
genericDictionary | A dictionary with generic keys and values. |
- Returns
- An array containing the keys of a dictionary.
◆ GetDictionaryValuesAsArray< TKey, TValue >()
static TValue[] BFGSDK.UnityWrapperUtilities.GetDictionaryValuesAsArray< TKey, TValue > | ( | Dictionary< TKey, TValue > | genericDictionary | ) | |
| inlinestatic |
This method returns the values of a dictionary as an array.
- Template Parameters
TKey | Generic type for the keys of the dictionary. |
TValue | Generic type for the values of the dictionary. |
- Parameters
genericDictionary | A dictionary with generic keys and values. |
- Returns
- An array containing the values of a dictionary.