[JAVA-4198] BasicDBObject.toString() returns STRICT extended JSON, expecting RELAXED Created: 16/Jun/21 Updated: 27/Oct/23 Resolved: 09/Jul/21 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | BSON, JSON |
| Affects Version/s: | 3.7.0, 3.12.0 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Unknown |
| Reporter: | Adamo Tonete (Inactive) | Assignee: | Unassigned |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | internal-user | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Case: | (copied to CRM) | ||||||||
| Description |
|
Older versions (pre-3.7) of the driver when calling BasicDBObject.toString() returns simple JSON output, i.e
New versions (3.7 to 3.12), when calling the BasicDBObject.toString() method returns STRICT extended json: i.e
Would it is possible to override the default behavior by some flag instead of using the BasicDBObject.toJson(JsonWriterSettings). Some applications rely on the prior behavior to feed other libraries that doesn't expect extended json. |
| Comments |
| Comment by Jeffrey Yemin [ 16/Jun/21 ] |
|
Hi adamo.tonete We can't really add any new behavior in the 3.12 driver, since at this point we're only doing patch releases according to the definitions in https://semver.org/. Note though that in the 4.0 release of the driver, BasicDBObject.toString() does return RELAXED extended JSON. |
| Comment by Jeffrey Yemin [ 16/Jun/21 ] |
|
A few notes:
|