json: Properly handle trailing comma error in object decoding.

Closes #16945
That's ok, was just curious!