[JAVA-2721] Add ability to cap the size of JSON generated by JsonWriter Created: 29/Dec/17 Updated: 28/Oct/23 Resolved: 09/Jan/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | JSON |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
It's useful to cap the length of JSON text when generating log statements that contain BSON documents. While one can generate the full JSON text and then take a substring, it's more efficient to stop writing as soon as the max size is reached, saving both memory and CPU. |
| Comments |
| Comment by Githook User [ 09/Jan/18 ] |
|
Author: {'name': 'Jeff Yemin', 'username': 'jyemin', 'email': 'jeff.yemin@10gen.com'}Message: |