@@ -268,6 +268,84 @@ public static class Value
268
268
{
269
269
private static final long serialVersionUID = 1L ;
270
270
271
+ /**
272
+ * Constant that indicates that property is to be always included,
273
+ * independent of value of the property.
274
+ * <p>
275
+ * This will specify the same setting for including a value both
276
+ * on <b>Java object level</b> as well as when <b>contained</b>
277
+ * in an object reference (see {@link JsonInclude} for further
278
+ * details on this distinction).
279
+ *
280
+ * @since 2.21
281
+ */
282
+ public final static Value ALL_ALWAYS = Value
283
+ .construct (Include .ALWAYS , Include .ALWAYS );
284
+
285
+ /**
286
+ * Constant that indicates that only properties with non-null
287
+ * values are to be included.
288
+ * <p>
289
+ * This will specify the same setting for including a value both
290
+ * on <b>Java object level</b> as well as when <b>contained</b>
291
+ * in an object reference (see {@link JsonInclude} for further
292
+ * details on this distinction).
293
+ *
294
+ * @since 2.21
295
+ */
296
+ public final static Value ALL_NON_NULL = Value
297
+ .construct (Include .NON_NULL , Include .NON_NULL );
298
+
299
+ /**
300
+ * Constant that indicates that properties are included unless their value
301
+ * is:
302
+ * <ul>
303
+ * <li>null</li>
304
+ * <li>"absent" value of a referential type (like Java 8 `Optional`, or
305
+ * {@link java.util.concurrent.atomic.AtomicReference}); that is, something
306
+ * that would not deference to a non-null value.
307
+ * </ul>
308
+ * This option is mostly used to work with "Optional"s (Java 8, Guava).
309
+ * <p>
310
+ * This will specify the same setting for including a value both
311
+ * on <b>Java object level</b> as well as when <b>contained</b>
312
+ * in an object reference (see {@link JsonInclude} for further
313
+ * details on this distinction).
314
+ *
315
+ * @since 2.21
316
+ */
317
+ public final static Value ALL_NON_ABSENT = Value
318
+ .construct (Include .NON_ABSENT , Include .NON_ABSENT );
319
+
320
+ /**
321
+ * Constant that indicates that only properties with null value,
322
+ * or what is considered empty, are not to be included.
323
+ * See {@link Include#NON_EMPTY} for further details.
324
+ * <p>
325
+ * This will specify the same setting for including a value both
326
+ * on <b>Java object level</b> as well as when <b>contained</b>
327
+ * in an object reference (see {@link JsonInclude} for further
328
+ * details on this distinction).
329
+ *
330
+ * @since 2.21
331
+ */
332
+ public final static Value ALL_NON_EMPTY = Value
333
+ .construct (Include .NON_EMPTY , Include .NON_EMPTY );
334
+
335
+ /**
336
+ * The equivalent to {@link Include#NON_DEFAULT} for specifying
337
+ * inclusion of non-defaults for both values and content.
338
+ * <p>
339
+ * This will specify the same setting for including a value both
340
+ * on <b>Java object level</b> as well as when <b>contained</b>
341
+ * in an object reference (see {@link JsonInclude} for further
342
+ * details on this distinction).
343
+ *
344
+ * @since 2.21
345
+ */
346
+ public final static Value ALL_NON_DEFAULT = Value
347
+ .construct (Include .NON_DEFAULT , Include .NON_DEFAULT );
348
+
271
349
protected final static Value EMPTY = new Value (Include .USE_DEFAULTS ,
272
350
Include .USE_DEFAULTS , null , null );
273
351
0 commit comments