[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:
Depends
is depended on by JAVA-2698 Include more of the command document ... Closed

 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: JAVA-2721: Add ability to cap the length of JSON text generated by JsonWriter
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/7e1f789411ac8546a063d32b2c29e065d105ac0d

Generated at Thu Feb 08 08:57:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.