diff --git a/packages/dynamite/dynamite/lib/src/type_result/base.dart b/packages/dynamite/dynamite/lib/src/type_result/base.dart index e78a1a1c..a9e93996 100644 --- a/packages/dynamite/dynamite/lib/src/type_result/base.dart +++ b/packages/dynamite/dynamite/lib/src/type_result/base.dart @@ -21,13 +21,7 @@ class TypeResultBase extends TypeResult { name == 'String' ? object : '$object.toString()'; @override - String deserialize(final String object, {final bool toBuilder = false}) { - if (name == 'JsonObject') { - return 'JsonObject($object)${nullable ? '?' : ''}'; - } - - return '($object as $nullableName)'; - } + String deserialize(final String object, {final bool toBuilder = false}) => '($object as $nullableName)'; @override String decode(final String object) { diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.dart b/packages/nextcloud/lib/src/nextcloud.openapi.dart index 4430686a..0bf64f68 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.dart +++ b/packages/nextcloud/lib/src/nextcloud.openapi.dart @@ -463,7 +463,7 @@ class NextcloudCoreClient { body, ); if (response.statusCode == 200) { - return JsonObject(JsonObject(utf8.decode(response.body))); + return JsonObject(utf8.decode(response.body)); } throw NextcloudApiException.fromResponse(response); // coverage:ignore-line }