Skip to content

Releases: ProjectMapK/jackson-module-kogera

2.17.0-beta12

30 Mar 07:03
a10665c
Compare
Choose a tag to compare

Enhancements

Update library versions

The version of Jackson is now 2.17.0.
#225

Some minor refactoring

#222, #223

2.16.1-beta11

10 Feb 16:33
c682e69
Compare
Choose a tag to compare

Enhancements

Updated kotlinx-metadata-jvm to 0.9.0.
Minor initialization performance degradation to fix a destructive change in the API.
#218

2.16.1-beta10

21 Jan 12:44
b9c4b1f
Compare
Choose a tag to compare

Enhancements

Some minor refactoring

#206 #211

Breaking changes

The ValueClassDeserializer has been renamed to WrapsNullableValueClassDeserializer

Despite its name, there was no need to use this class other than as a value class to wrap nullables.
Therefore, it has been modified to use a special name.

#211

2.16.0-beta9

21 Dec 15:42
d5d4bd6
Compare
Choose a tag to compare

Enhancements

Enhanced deserialization support for value class wrapping nullable

If the argument is a value class and non-null that wraps nullable and the input is explicit null, deserialization would previously have failed.
On the other hand, from now on the wrapped null will be used.

It is also now possible for users to customize this behavior by implementing a ValueClassDeserializer.
#196

Breaking changes

The exception thrown by the KotlinValueInstantiator is now InvalidNullException

And the attached message has been changed to default to InvalidNullException.
#195

Bigfixes

Fix handling of vararg deserialization

When vararg arguments were used during deserialization, there was a problem with them being treated like non-null arrays.
Now it is handled as follows.

  • Marked as not isRequired.
  • If the input is undefined, an empty array is used by default
    #197

Fixed a problem where the Nulls setting was ignored if the input was undefined

Previously, in Kogera, if the input was undefined and no default argument was set, the nullValueProvider was not called and the value of JsonSetter(nulls = ) was ignored.
This behavior differed from that of kotlin-module in that it did not generate the error expected for primitive types.

Therefore, a change has been made to always call nullValueProvider if the input is undefined.

Note that this change changes the behavior when undefined input is received if you are using a JsonDeserializer that implements absentValue to return a non-null value.
#200

Ported

Ported changes made to jackson-module-kotlin.

2.16.0-beta8

02 Dec 12:30
ddebf90
Compare
Choose a tag to compare

Enhancements

Fix deserialization method of value class

Internal implementation changes have been made regarding deserialization of value class.
This allows the following functionality to be used

  • Deserializer specification by JsonDeserialize annotation
  • Allow absentValue set to deserializer to return value class
  • Injection of value class by JacksonInject

#183

Note that an error will now occur if you have set an absentValue or other value class that is unboxed.

Access checks to ValueCreator are now performed earlier

#182

Remove unnecessary judgment when a value is missing during deserialization.

This is expected to improve deserialization performance, albeit slightly.
#186

Bigfixes

Implement readResolve for serializable objects

#182

Fixed a problem where some KDoc links were broken

#182

2.16.0-beta7

19 Nov 14:07
05ff33a
Compare
Choose a tag to compare

Enhancements

Update library versions

First, the version of Jackson is now 2.16.0.

Also, kotlinx-metadata-jvm has been updated to 0.7.0, and along with it, the version of Kotlin is now 1.8.22.
The minimum Kotlin version for this project is the lowest Kotlin version required by kotlinx-metadata-jvm.
#175

Reduced resource usage when registering the same KotlinModule instance to multiple mappers

Only one instance of the internal support classes are now created for each instance of KotlinModule.
This improves resource efficiency and initialization performance when registering KotlinModule to multiple Mappers.
See #173 for details.

Cache sizes may need to be reviewed for hard use cases, as internal processing caches will also be shared.
Also note that calling the set method on a KotlinModule can destroy the functionality of the KotlinModule.

Updating kotlinter.

To update kotlinter, some changes have been made to internal package names, etc.
This change does not affect the published API.
#170
#171
#172

Breaking changes

Consolidate cache size to one property.

The initialCacheSize/maxCacheSize properties have been removed and merged into cacheSize: KotlinModule.CacheSize.
#176

Bigfixes

Implement readResolve for object which implements Serializable.

The problem of multiple instances of object being created during the JDK deserialization process has been fixed.
#174

2.15.3-beta6

05 Nov 14:36
d87f1fc
Compare
Choose a tag to compare

Enhancements

Improve efficiency of reflection cache

The problem of infrequently used caches being retained has been eliminated, and the maximum number of records to be retained as a cache has been reduced.
See #164 for details.

Please note that the reflectionCacheSize property has been removed and split into initialCacheSize and maxCacheSize.

Improved efficiency of strictNullCheck

Previously strictNullCheck was done by Kogeras own Converter, but now JsonSetter(contentNulls = FAIL) is used.
This makes null checking more efficient and error messages clearer (from now on InvalidNullException will be thrown).

If you have implemented findSetterInfo by your own AnnotationIntrospector, or if your JsonSetter annotation has a non-DEFAULT value for contentNulls, the strictNullCheck may not work as intended.
Also, although unconfirmed, there is a possibility that the behavior may change when the Converter (Deserializer) is no longer used.
#159

Jackson version is updated

#160

Breaking changes

The JsonUnbox annotation has been renamed to the JsonKUnbox

#158

Bigfixes

Correction of ValueParameter.isPrimitive was incorrect

#162

2.15.2-beta5

08 Oct 17:43
d52ebf5
Compare
Choose a tag to compare

Enhancements

Add JsonUnbox annotation

This annotation improves the serialization performance of value class when only unbox is needed.
#154

This feature is documented.
https://github.com/ProjectMapK/jackson-module-kogera/blob/develop/docs/AboutValueClassSupport.md#serialization-performance-improvement-using-jsonunbox

Minor optimizations

#146
#147
#155

Others

The Gradle version has been updated to 8.3.
Also, tests for running on K2 have been added.

2.15.2-beta4

16 Sep 08:33
88afb9b
Compare
Choose a tag to compare

Enhancements

Streamline KmClass initialization process

The initialization process was made more efficient by omitting the unused contents of KmClass.
#143

ClosedRange conversions to be handled by AbstractTypeResolver

This makes the code easier to understand.
In addition, since the processing target is now limited to classes, the initialization process is expected to be faster, albeit only slightly.
#139

Update kotlinx-metadata version

0.6.0 -> 0.6.2
#138

Minor optimization on initialization process

#140, #141, #142

Bigfixes

Porting of features from the original

2.15.2-beta3

02 Sep 02:05
ef5c047
Compare
Choose a tag to compare

Enhancements

Porting of features from the original

Significant improvement in value class serialization performance

Fixed unbox-impl function so that once it is retrieved, it is used throughout.
This fixes the problem that the unbox-impl function is obtained at each serialization.
#135

Performance comparisons are noted in the comment below.
#135 (comment)

Changed box-impl function to be cached

This improves initialization performance when the same value class is used in both serialization and deserialization.
#134

Minor improvements to improve performance and reduce memory consumption

#132

Breaking changes

The getter-like/setter-like functions are no longer ignored

The jackson-module-kogera has ignored getter-like/setter-like functions in the past.
This is because I felt that these are functions, not properties, and should not interact with JSON.

On the other hand, this process was degrading initialization performance, and there was little benefit to be gained by ignoring them.

Therefore, this ignore process has been removed.
However, please note that the policy of jackson-module-kogera to basically provide functions only for properties has not changed.
#130