Skip to content

Commit 901081b

Browse files
committed
Update README
1 parent a0502be commit 901081b

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,33 @@ instance of which is constructed by `JsonFactory`:
104104

105105
An example can be found from [Reading and Writing Event Streams](http://www.cowtowncoder.com/blog/archives/2009/01/entry_132.html)
106106

107+
## Processing limits
108+
109+
Starting with [Jackson 2.15](https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.15) Jackson has configurable limits for some aspects of input decoding and output generation.
110+
111+
Implemented limits are:
112+
113+
* Length are expressed in input/output units -- `byte`s or `char`s -- depending on input source
114+
* Defined as longest allowed length, but not necessarily imposed at 100% accuracy: that is, if maximum allowed length is specified as 1000 units, something with length of, say 1003 may not cause exception (but 1500 would typically do)
115+
* Defined using new `StreamReadConstraints` / `StreamWriteConstraints` classes, configurable on per-`JsonFactory` basis
116+
* Main focus is to reduce likelihood of excessive memory usage/retention and/or processing costs; not validation
117+
118+
### Input parsing limits
119+
120+
* Maximum number token length (2.15+): (see https://github.com/FasterXML/jackson-core/issues/815)
121+
* Default: Maximum 1000 for both integral and floating-point numbers.
122+
* Maximum String value length (2.15+): (see https://github.com/FasterXML/jackson-core/issues/863)
123+
* Default: 20_000_000 (20 million) (since 2.15.1; 2.15.0 had lower limit, 5 million)
124+
* Maximum Input nesting depth (2.15+): (see https://github.com/FasterXML/jackson-core/pull/943)
125+
* Default: 1000 levels
126+
127+
### Output generation limits
128+
129+
* Maximum Output nesting depth (2.16+): (see https://github.com/FasterXML/jackson-core/pull/1055)
130+
* Default: 1000 levels
131+
* Maximum Property name length (2.16+): (see https://github.com/FasterXML/jackson-core/issues/1047)
132+
* Default: 50,000
133+
107134
-----
108135

109136
## Compatibility

0 commit comments

Comments
 (0)