Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Releases: agcom/bson

0.5.0

29 Sep 19:20
Compare
Choose a tag to compare
0.5.0 Pre-release
Pre-release

New Features

  • Added support for all deprecated / internal bson types (#13).

0.4.0

26 Sep 19:42
Compare
Choose a tag to compare
0.4.0 Pre-release
Pre-release

Breaking changes

  • Removed deprecated load(deserializer, bytes, type) function.

Bug fixes

  • org.bson.BSONException (#12).

Known issues

  • SerializationCodecRegistry: Extracting polymorphic serializer, sub with multiple bases (#56).

0.3.0

25 Sep 19:26
Compare
Choose a tag to compare
0.3.0 Pre-release
Pre-release

Future group id change (#66) was back-ported to this release (affected the published artifacts).

Breaking Changes

  • BsonValueSerializer now won't decode deprecated bson types.
  • Functions Set<RegexOption>.asEmbedded() and String.toRegexOptions() are now declared as internal.
  • Removed load / dump primitive type support (#43, #18).
  • Changed BsonInput.decodeRegularExpression and BsonOutput.encodeRegularExpression signature to use Pattern (#51).
  • Applied semantic versioning practices (#60) .
  • Removed obsolete packages (#62).

New Features

  • Added loadBsonDocument, loadBsonArray and dumpBson functions (#44).
  • Added constructor like builder for BsonBinary and BsonRegularExpression using corresponding platform types.
  • Added BsonDocument.toBsonArray and BsonArray.toBsonDocument functions (#44).
  • Added unique serializers per bson type (#49).
  • Added some missing serializers (#42).

Bug Fixes

  • Declared application binary interfaces as transitive dependencies (#37).
  • Fixed SerializationCodecRegistry inconsistent behavior (#26).
  • Fixed regex flags support (#46).

Improvements

  • Added README (#14).
  • Added code documentations (#14).
  • Extended the Bson default contextual module.
  • Extended TemporalSerializer to TemporalAccessorSerializer.
  • Cached polymorphics structure in SerializationCodecRegistry (#48).
  • Dropped Kotlin compile byte code version to 1.8 (#63).

Other Changes

  • Marked load(deserializer, bytes, type) function as deprecated (#44).
  • Extended and cleaned the tests.
  • Moved pom meta-data into XML files.

Known issues

  • SerializationCodecRegistry: Extracting polymorphic serializer, sub with multiple bases (#56).
  • org.bson.BSONException (#12).

0.2.0

24 Sep 19:06
3d1c614
Compare
Choose a tag to compare
0.2.0 Pre-release
Pre-release

This release was known as v1.0.1 before migrating to semantic versioning.
Future group id change (#66) was back-ported to this release (affected the published artifacts).

Upgrade steps

  • New dependencies

    Gradle example,

    dependencies {
        implementation 'com.github.agcom:bson-mongodb:1.0.1' // Old bson-codec:1.0.0
        implementation 'com.github.agcom:bson-serialization:1.0.1' // Old bson-core:1.0.0
    }

    The bson-core:1.0.0 and bson-codec:1.0.0 are marked as obsolete and they're going to be removed (#33).

    • Change artifact id
      • bson-core to bson-serialization
      • bson-codec to bson-mongodb
    • Change versions from 1.0.0 to 1.0.1
  • Package names; Update your import statements.

    • Anything under com.github.agcom.bson.core moved to com.github.agcom.bson.serialization.
    • Anything under com.github.agcom.bson.codecs moved to com.github.agcom.bson.mongodb.codecs.

Breaking changes

  • Most of the import statements are gonna be red. As mentioned in the Upgrade steps, package directives has changed.

Known issues

  • Known issues from the last version v1.0.0.

0.1.0

24 Sep 19:03
9e15cee
Compare
Choose a tag to compare
0.1.0 Pre-release
Pre-release

Package namings' changes from the v0.2.0 was back-ported to this release (affected the published artifacts).
This release was known as v1.0.0 before migrating to semantic versioning.
Future group id change (#66) was back-ported to this release (affected the published artifacts).

New features

  • Serialization functions,

    Can be found in the com.github.agom.bson.Bson class. Extends BinaryFormat.

    • toBson --> Transform an object to a BsonValue.
    • fromBson --> Transform BsonValue to an object.
    • dump --> Transform an object to a ByteArray.
    • load --> Transform ByteArray to an object.
  • Special serializers,

    Can be found under com.github.agcom.bson.serializers package.

    • BsonValueSerializer

      Ports to BsonPrimitiveSerializer, BsonArraySerializer and BsonDocumentSerializer based on the bson type.

    • TemporalSerializer --> Corresponds to java.time.temporal.Temporal interface and it's known subclasses.

      A serializer exists for each subclass, named <subclass>Serializer.

    • Bson type's serializers

      • BinarySerializer
      • ObjectIdSerializer
      • DateTimeSerializer
      • JavaScriptSerializer
      • Decimal128Serializer
      • RegexSerializer and PatternSerializer
  • MongoDB serialization codec registry

    Under the bson-codec artifact, com.github.agcom.bson.codecs package.

    • SerializationCodec --> Extends org.bson.codecs.Codec. Receives a serializer and a bson (com.github.agcom.bson.Bson) instance.

    • SerializationCodecRegistry --> Extends org.bson.codecs.configuration.CodecRegistry. Receives a bson instance, extracts the serializer.

      Serializer extraction procedure,

      1. Class annotated with Serializable
      2. Built-in type
      3. Contextual
      4. Polymorphic serializer

Known issues

  • Related to serialization load function, #18.