diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.dart index bacd1d4f..b29e309d 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.dart @@ -42,13 +42,8 @@ class CreatePatchArtifactResponse { final String hash; /// The size of the artifact in bytes. - @JsonKey(fromJson: _parseStringToInt, toJson: _parseIntToString) final int size; /// The upload URL for the artifact. final String uploadUrl; - - static int _parseStringToInt(dynamic value) => int.parse(value as String); - - static String _parseIntToString(dynamic value) => value.toString(); } diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.g.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.g.dart index ac9b4091..434e1652 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.g.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch_artifact/create_patch_artifact_response.g.dart @@ -20,8 +20,7 @@ CreatePatchArtifactResponse _$CreatePatchArtifactResponseFromJson( arch: $checkedConvert('arch', (v) => v as String), platform: $checkedConvert('platform', (v) => v as String), hash: $checkedConvert('hash', (v) => v as String), - size: $checkedConvert( - 'size', (v) => CreatePatchArtifactResponse._parseStringToInt(v)), + size: $checkedConvert('size', (v) => v as int), uploadUrl: $checkedConvert('upload_url', (v) => v as String), ); return val; @@ -37,6 +36,6 @@ Map _$CreatePatchArtifactResponseToJson( 'arch': instance.arch, 'platform': instance.platform, 'hash': instance.hash, - 'size': CreatePatchArtifactResponse._parseIntToString(instance.size), + 'size': instance.size, 'upload_url': instance.uploadUrl, }; diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.dart index 25ff20c5..d9dc1c89 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.dart @@ -42,13 +42,8 @@ class CreateReleaseArtifactResponse { final String hash; /// The size of the artifact in bytes. - @JsonKey(fromJson: _parseStringToInt, toJson: _parseIntToString) final int size; /// The upload URL for the artifact. final String uploadUrl; - - static int _parseStringToInt(dynamic value) => int.parse(value as String); - - static String _parseIntToString(dynamic value) => value.toString(); } diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.g.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.g.dart index e6d3c85d..4dd994f8 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.g.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_release_artifact/create_release_artifact_response.g.dart @@ -20,8 +20,7 @@ CreateReleaseArtifactResponse _$CreateReleaseArtifactResponseFromJson( arch: $checkedConvert('arch', (v) => v as String), platform: $checkedConvert('platform', (v) => v as String), hash: $checkedConvert('hash', (v) => v as String), - size: $checkedConvert('size', - (v) => CreateReleaseArtifactResponse._parseStringToInt(v)), + size: $checkedConvert('size', (v) => v as int), uploadUrl: $checkedConvert('upload_url', (v) => v as String), ); return val; @@ -37,6 +36,6 @@ Map _$CreateReleaseArtifactResponseToJson( 'arch': instance.arch, 'platform': instance.platform, 'hash': instance.hash, - 'size': CreateReleaseArtifactResponse._parseIntToString(instance.size), + 'size': instance.size, 'upload_url': instance.uploadUrl, };