diff --git a/packages/ejson/lib/src/decoding.dart b/packages/ejson/lib/src/decoding.dart index d0c369c9d..f91549abb 100644 --- a/packages/ejson/lib/src/decoding.dart +++ b/packages/ejson/lib/src/decoding.dart @@ -243,7 +243,7 @@ UndefinedOr _decodeUndefinedOr(EJsonValue ejson) { Uuid _decodeUuid(EJsonValue ejson) { return switch (ejson) { - {'\$binary': {'base64': String s, 'subType': '04'}} => Uuid.fromBytes(base64.decode(s).buffer), + {'\$binary': {'base64': String s, 'subType': '04'}} => Uuid.fromBytes(base64.decode(s)), _ => raiseInvalidEJson(ejson), }; } diff --git a/packages/ejson/lib/src/encoding.dart b/packages/ejson/lib/src/encoding.dart index fd58b398a..cfe11b15d 100644 --- a/packages/ejson/lib/src/encoding.dart +++ b/packages/ejson/lib/src/encoding.dart @@ -117,7 +117,7 @@ EJsonValue _encodeSymbol(Symbol value) => {'\$symbol': value.name}; EJsonValue _encodeUndefined(Undefined undefined) => {'\$undefined': 1}; -EJsonValue _encodeUuid(Uuid uuid) => _encodeBinary(uuid.bytes.asUint8List(), subtype: '04'); +EJsonValue _encodeUuid(Uuid uuid) => _encodeBinary(uuid.bytes, subtype: '04'); EJsonValue _encodeBinary(Uint8List buffer, {required String subtype}) => { '\$binary': { diff --git a/packages/ejson/pubspec.yaml b/packages/ejson/pubspec.yaml index 02b1a68be..b02fdbecb 100644 --- a/packages/ejson/pubspec.yaml +++ b/packages/ejson/pubspec.yaml @@ -2,7 +2,7 @@ name: ejson description: >- EJSON serialization. - BSON is a binary format used to store JSON-like documents efficiently. + BSON is a binary format used to store JSON-like documents efficiently. EJSON extends JSON defining how all BSON types should be represented in JSON. topics: @@ -22,7 +22,7 @@ dependencies: collection: ^1.17.0 ejson_annotation: ^0.3.0 objectid: ^3.0.0 - sane_uuid: ^1.0.0-alpha.5 + sane_uuid: ^1.0.1 type_plus: ^2.0.0 dev_dependencies: diff --git a/packages/realm_common/pubspec.yaml b/packages/realm_common/pubspec.yaml index e97f238ed..800a577fe 100644 --- a/packages/realm_common/pubspec.yaml +++ b/packages/realm_common/pubspec.yaml @@ -15,7 +15,7 @@ environment: dependencies: collection: ^1.18.0 objectid: ^3.0.0 - sane_uuid: ^1.0.0-alpha.5 + sane_uuid: ^1.0.1 dev_dependencies: lints: ^3.0.0