Skip to content

Commit

Permalink
Merge branch '2.16'
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Aug 31, 2023
2 parents dac5c85 + 40cd6b7 commit 32c7703
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ An example can be found from [Reading and Writing Event Streams](http://www.cowt

## Processing limits

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.
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.

Implemented limits are:

Expand Down Expand Up @@ -135,11 +135,34 @@ Implemented limits are:

You can change per-factory limits as follows:

```java
JsonFactory f = JsonFactory.builder()
.streamReadConstraints(StreamReadConstraints.builder().maxNumberLength(250).build())
.streamWriteConstraints(StreamWriteConstraints.builder().maxNestingDepth(2000).build())
.build();
```

## Error Report Configuration

Starting with [Jackson 2.16](https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.16), Jackson offers configurable
behavior around error-reporting.

Currently supported configuration options are:

- `maxErrorTokenLength` : Maximum length of token to include in error messages (2.16+): (see [#1066](https://github.com/FasterXML/jackson-core/issues/1066))
- `maxRawContentLength` : Maximum length of raw content to include in error messages (2.16+): (see [#1066](https://github.com/FasterXML/jackson-core/issues/1066))

... see [Example](#example) section below.

### Example

```java
JsonFactory f = JsonFactory.builder()
.streamReadConstraints(StreamReadConstraints.builder().maxNumberLength(250).build())
.streamWriteConstraints(StreamWriteConstraints.builder().maxNestingDepth(2000).build())
.build();
.errorReportConfiguration(ErrorReportConfiguration.builder()
.maxErrorTokenLength(1004)
.maxRawContentLength(2008)
.build()
).build();
```

-----
Expand Down

0 comments on commit 32c7703

Please sign in to comment.