File tree 1 file changed +3
-1
lines changed
libs/x-content/src/main/java/org/opensearch/common/xcontent/json 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 37
37
import com .fasterxml .jackson .core .JsonGenerator ;
38
38
import com .fasterxml .jackson .core .JsonParser ;
39
39
import com .fasterxml .jackson .core .StreamReadConstraints ;
40
-
40
+ import com . fasterxml . jackson . core . StreamWriteFeature ;
41
41
import org .opensearch .core .xcontent .DeprecationHandler ;
42
42
import org .opensearch .core .xcontent .MediaType ;
43
43
import org .opensearch .core .xcontent .NamedXContentRegistry ;
@@ -78,6 +78,8 @@ public static XContentBuilder contentBuilder() throws IOException {
78
78
jsonFactory .configure (JsonGenerator .Feature .AUTO_CLOSE_JSON_CONTENT , false );
79
79
jsonFactory .configure (JsonParser .Feature .STRICT_DUPLICATE_DETECTION , true );
80
80
jsonFactory .setStreamReadConstraints (StreamReadConstraints .builder ().maxStringLength (DEFAULT_MAX_STRING_LEN ).build ());
81
+ jsonFactory .configure (JsonParser .Feature .USE_FAST_DOUBLE_PARSER , true );
82
+ jsonFactory .configure (StreamWriteFeature .USE_FAST_DOUBLE_WRITER .mappedFeature (), true );
81
83
jsonXContent = new JsonXContent ();
82
84
}
83
85
You can’t perform that action at this time.
0 commit comments