Add typing and tests for JSONOutput, and fix some bad results.
Review Request #13034 — Created May 10, 2023 and submitted
JSONOutputto have type hints, helping callers use the
right arguments, and fixes some bad documentation.
It also fixes up a less-than-ideal exception for
.append(), which was
raising a (documented)
AttributeErrorif trying to append to a
We now have unit tests covering all of the class, ensuring we don't
Unit tests pass.