Update `BasicJsonParser` to protect against deeply nested JSON lists in the same way as Jackson. Fixes gh-31868