dynamite, neon: fix plain object deserialization
@ -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)';
String decode(final String object) {
@ -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