deserialize method
- @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.')
dynamic
deserialize(
- dynamic json,
- String targetType, {
- bool growable = false,
})
Implementation
@Deprecated(
'Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.')
dynamic deserialize(dynamic json, String targetType,
{bool growable = false}) {
// Remove all spaces. Necessary for regular expressions as well.
targetType =
targetType.replaceAll(' ', ''); // ignore: parameter_assignments
// If the expected target type is String, nothing to do...
return targetType == 'String'
? jsonEncode(json)
: _deserialize(json, targetType, growable: growable == true);
}