Annotation Interface JsonSkip


@Target(FIELD) @Retention(RUNTIME) public @interface JsonSkip
Русский: Аннотаций позволяет указать что поля требует игнорировать при записи/чтении JSON
English: Annotations allows you to specify what fields to ignore when writing/reading JSON

Пример / Example:
 
 @Json
 record Example(String movie, @JsonSkip String author) { }
 
 
 
 jsonWriter.toByteArray(new Example("Interstellar", "Christopher Nolan"));
 
 

 { "movie": "Interstellar" }