Records to/from JSON
Remi Forax
forax at univ-mlv.fr
Thu May 7 22:17:53 UTC 2020
----- Mail original -----
> De: "Alex Buckley" <alex.buckley at oracle.com>
> À: "amber-dev" <amber-dev at openjdk.java.net>
> Envoyé: Jeudi 7 Mai 2020 23:35:07
> Objet: Re: Records to/from JSON
> On 5/7/2020 1:27 PM, Brian Goetz wrote:
>> There's a nice writeup of using records with Jackson here:
>>
>> https://angiejones.tech/?p=5434
>
> I cringed when I saw `@JsonProperty` annotations duplicating the record
> component names (shades of `@PathParam("id") String id;` from JAX-RS)
> but it seems like the Jackson team is on its way to not needing them.
I never understood why we don't have a meta annotation to say if i put this annotation on one of the a method parameter then javac should also generate the Parameter attribute for that method ?
>
> A critical issue for the Jackson team seems to be detecting that a class
> is a record without using `Class::isRecord`, because it doesn't exist on
> Java 8. Multi-Release JARs, documented in JEP 238, would help Jackson here.
>
> Alex
Rémi
More information about the amber-dev
mailing list