Releases: agcom/bson
0.5.0
0.4.0
0.3.0
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()
andString.toRegexOptions()
are now declared as internal. - Removed
load / dump
primitive type support (#43, #18). - Changed
BsonInput.decodeRegularExpression
andBsonOutput.encodeRegularExpression
signature to usePattern
(#51). - Applied semantic versioning practices (#60) .
- Removed obsolete packages (#62).
New Features
- Added
loadBsonDocument
,loadBsonArray
anddumpBson
functions (#44). - Added constructor like builder for
BsonBinary
andBsonRegularExpression
using corresponding platform types. - Added
BsonDocument.toBsonArray
andBsonArray.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
toTemporalAccessorSerializer
. - 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
0.2.0
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
andbson-codec:1.0.0
are marked as obsolete and they're going to be removed (#33).- Change artifact id
bson-core
tobson-serialization
bson-codec
tobson-mongodb
- Change versions from
1.0.0
to1.0.1
- Change artifact id
-
Package names; Update your
import
statements.- Anything under
com.github.agcom.bson.core
moved tocom.github.agcom.bson.serialization
. - Anything under
com.github.agcom.bson.codecs
moved tocom.github.agcom.bson.mongodb.codecs
.
- Anything under
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
Package namings' changes from the
v0.2.0
was back-ported to this release (affected the published artifacts).
This release was known asv1.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. ExtendsBinaryFormat
.toBson
--> Transform an object to aBsonValue
.fromBson
--> TransformBsonValue
to an object.dump
--> Transform an object to aByteArray
.load
--> TransformByteArray
to an object.
-
Special serializers,
Can be found under
com.github.agcom.bson.serializers
package.-
BsonValueSerializer
Ports to
BsonPrimitiveSerializer
,BsonArraySerializer
andBsonDocumentSerializer
based on the bson type. -
TemporalSerializer
--> Corresponds tojava.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
andPatternSerializer
-
-
MongoDB serialization codec registry
Under the
bson-codec
artifact,com.github.agcom.bson.codecs
package.-
SerializationCodec
--> Extendsorg.bson.codecs.Codec
. Receives a serializer and a bson (com.github.agcom.bson.Bson
) instance. -
SerializationCodecRegistry
--> Extendsorg.bson.codecs.configuration.CodecRegistry
. Receives a bson instance, extracts the serializer.Serializer extraction procedure,
- Class annotated with
Serializable
- Built-in type
- Contextual
- Polymorphic serializer
- Class annotated with
-
Known issues
- Related to serialization
load
function, #18.