deserialize method
- @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.')
dynamic
deserialize(
- String json,
- String targetType, {
- bool? growable,
})
Implementation
@Deprecated(
'Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.')
dynamic deserialize(String json, String targetType, {bool? growable}) {
// 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'
? json
: _deserialize(jsonDecode(json), targetType,
growable: growable == true);
}