Interface IDictionaryConvertible
Contract for objects that can be:
- converted to a JSON ready dictionary
- filled by a JSON dictionary
Namespace: UnityEngine.GameFoundation
Syntax
public interface IDictionaryConvertible
Methods
FillFromDictionary(Dictionary<String, Object>)
Reset this object and fill it with the given data.
Declaration
void FillFromDictionary(Dictionary<string, object> rawDictionary)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<String, Object> | rawDictionary | A dictionary containing JSON data. Note: Expect integer values (enum included) to be stored as Int64 and floating values to be stored as Double. |
Remarks
Avoid to use reflection here or this will strongly impact GameFoundation's Json deserialization performances.
ToDictionary()
Converts this object to a JSON ready dictionary.
Declaration
Dictionary<string, object> ToDictionary()
Returns
Type | Description |
---|---|
Dictionary<String, Object> | Returns a dictionary containing this object's data. |
Remarks
Avoid to use reflection here or this will strongly impact GameFoundation's Json serialization performances.