types
types copied to clipboard
Improving serializers
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
Unreleasedsection in changelog.
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).
A better example exists in the NotBlankString type of the issue #254, declaring a qualifiedName field of type NotBlankString inaccessible from Java.
This issue is outdated.