|
static IDictionary< string, object > | ToNullableMap (object value) |
| Converts value into map object or returns null when conversion is not possible. More...
|
|
static IDictionary< string, object > | ToMap (object value) |
| Converts value into map object or returns empty map when conversion is not possible. More...
|
|
static IDictionary< string, object > | ToMapWithDefault (object value, Dictionary< string, object > defaultValue) |
| Converts value into map object or returns default map when conversion is not possible. More...
|
|
Converts arbitrary values into map objects using extended conversion rules:
- Objects: property names as keys, property values as values
- Arrays: element indexes as keys, elements as values
var value1 = MapConverted.ToNullableMap("ABC");
var value2 = MapConverted.ToNullableMap({ key: 123 });
var value3 = MapConverted.ToNullableMap(new int[] { 1, 2, 3 });