Browse Source

Merge pull request #759 from nextcloud/feature/dynamite/decode-booleans

feat(dynamite): Support decoding booleans
pull/838/head
Kate 1 year ago committed by GitHub
parent
commit
5ebdb6fab7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/dynamite/dynamite/lib/src/type_result/base.dart

2
packages/dynamite/dynamite/lib/src/type_result/base.dart

@ -34,6 +34,8 @@ class TypeResultBase extends TypeResult {
return '($object as String)';
case 'int':
return 'int.parse($object as String)';
case 'bool':
return "($object as String == 'true')";
case 'JsonObject':
return 'JsonObject($object)';
default:

Loading…
Cancel
Save