Skip to content

Commit cf0ced9

Browse files
committed
Add JsonUnbox document
1 parent 7dc2a10 commit cf0ced9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/AboutValueClassSupport.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ The same policy applies to deserialization.
4343
This policy was decided with reference to the behavior as of `jackson-module-kotlin 2.14.1` and [kotlinx-serialization](https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/value-classes.md#serializable-value-classes).
4444
However, these are just basic policies, and the behavior can be overridden with `JsonSerializer` or `JsonDeserializer`.
4545

46+
### Serialization performance improvement using `JsonUnbox`
47+
In `jackson-module-kogera`, the `jackson` functionality is modified by reflection so that the `Jackson` functionality works for `value class` as well.
48+
These are executed on all calls.
49+
On the other hand, if only `unbox` is required, these are extra overheads that can significantly impair serialization performance.
50+
51+
Therefore, `jackson-module-kogera` provides the `JsonUnbox` annotation.
52+
When this annotation is provided, serialization performance is improved because only calls to `getter` that is `unboxed` will be made.
53+
4654
## For features that would not be supported
4755
I do not intend to support features that require significant effort to support and that can be circumvented by user definition.
4856

0 commit comments

Comments
 (0)