types icon indicating copy to clipboard operation
types copied to clipboard

Improving serializers

Open LVMVRQUXL opened this issue 2 years ago • 2 comments

Description

We would like to refactor serializers by using the qualified name of the corresponding type as serial name instead of defining it ourselves with a hardcoded string.

Checklist

  • [ ] Update the serializer of NotEmptyList.
  • [ ] Update the serializer of NotEmptySet.
  • [ ] Update the serializer of NotEmptyMap.
  • [ ] Update the serializer of AnyInt.
  • [ ] Update the serializer of NonZeroInt.
  • [ ] Update the serializer of PositiveInt.
  • [ ] Update the serializer of NegativeInt.
  • [ ] Update the serializer of StrictlyPositiveInt.
  • [ ] Update the serializer of StrictlyNegativeInt.
  • [ ] Update the serializer of StrictlyPositiveDouble.
  • [ ] Update the serializer of ZeroInt.
  • [ ] Update the serializer of NotBlankString.
  • [ ] Test.
  • [ ] Refactor.
  • [ ] Check and update the public API binaries.
  • [ ] Update the Unreleased section in changelog.

LVMVRQUXL avatar Sep 26 '23 21:09 LVMVRQUXL

We can't use the reflection API for getting the qualified name of a given type: it is not supported on the JS platform. Instead, we should add a constant named QUALIFIED_NAME in the type's companion object (see an example for the ZeroInt type).

LVMVRQUXL avatar Sep 26 '23 21:09 LVMVRQUXL

A better example exists in the NotBlankString type of the issue #254, declaring a qualifiedName field of type NotBlankString inaccessible from Java.

LVMVRQUXL avatar Oct 07 '23 20:10 LVMVRQUXL

This issue is outdated.

LVMVRQUXL avatar Jul 20 '24 09:07 LVMVRQUXL