From c82a961459ab96cbaeb983fdce83fea1aee17267 Mon Sep 17 00:00:00 2001 From: Jorge Bescos Gascon Date: Fri, 1 Oct 2021 14:17:17 +0200 Subject: [PATCH] introduce null-save JsonObjectBuilder.add and JsonGenerator.write methods #213 Signed-off-by: Jorge Bescos Gascon --- api/src/main/java/jakarta/json/JsonBuilderFactory.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/src/main/java/jakarta/json/JsonBuilderFactory.java b/api/src/main/java/jakarta/json/JsonBuilderFactory.java index 214bf762..486dd8d8 100644 --- a/api/src/main/java/jakarta/json/JsonBuilderFactory.java +++ b/api/src/main/java/jakarta/json/JsonBuilderFactory.java @@ -50,6 +50,12 @@ */ public interface JsonBuilderFactory { + /** + * Configuration property to ignore null values. All providers + * must support this property. The value of the property is boolean. + */ + public static final String IGNORE_ADDING_IF_NULL = "jakarta.json.JsonBuilderFactory.ignoreAddingIfNull"; + /** * Creates a {@code JsonObjectBuilder} instance that is used to build * {@link JsonObject}.