JSONWriter should support adding non containers at max depth
The JSON fuzzing tests failed to write JSON via JSONWriter::Write that was successfully read with JSONReader. This was due to an edge case where we are writing the JSON and have reached max depth (200) but have non-container leaf entries at that level and nothing deeper. This case should be supported by the JSONWriter to match the JSONReader and JSONParser. Also added a unit test for this case. Bug: 1138450, 1013934 Change-Id: I98fcd63c957ab4e85a322d923bef18b981220383 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2477239Reviewed-by:Daniel Cheng <dcheng@chromium.org> Commit-Queue: Chris Davis <chrdavis@microsoft.com> Cr-Commit-Position: refs/heads/master@{#818212}
Showing
Please register or sign in to comment