From 8116a304e45ff42e40d940ad49a6c471f8b5ff65 Mon Sep 17 00:00:00 2001 From: lwpro2 Date: Wed, 25 May 2022 11:16:20 +0800 Subject: [PATCH] add new feature flag to intern value string --- .../java/com/fasterxml/jackson/core/JsonFactory.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/com/fasterxml/jackson/core/JsonFactory.java b/src/main/java/com/fasterxml/jackson/core/JsonFactory.java index 384e336343..3ba5c6a1d4 100644 --- a/src/main/java/com/fasterxml/jackson/core/JsonFactory.java +++ b/src/main/java/com/fasterxml/jackson/core/JsonFactory.java @@ -80,6 +80,16 @@ public enum Feature */ INTERN_FIELD_NAMES(true), + /** + * Similar to INTERN_FIELD_NAMES, this will determine whether the filed values + * to be canonicalized using {@link String#intern} or not: + * if enabled, all field values will be intern()ed (and caller + * can count on this being true for all such values); if disabled, + * no intern()ing is done. + * This setting is disabled by default. + */ + INTERN_FIELD_VALUES(false), + /** * Feature that determines whether JSON object field names are * to be canonicalized (details of how canonicalization is done