BUG: Fixed encoding of pd.NA with to_json
- [x] closes #31615
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

@WillAyd I've ran the full asv suite, and then re-ran any asv tests that had a ratio >1.1

There are no significant changes from this PR.

Let me know if you want any more information or results files. @WillAyd I ran the entire suite.  Whenever I run the entire suite I always get false positives, so I rerun anything that shows up on the first go-around.

There are no significant performance differences in io.json.ToJSON (or anywhere else). @ArtificialQualia Thanks a lot! Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
$ git checkout 1.0.x
$ git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
$ git cherry-pick -m1 0bfb8cbdb7bac29d158a868817f606145bf72f06
```

3. You will likely have some merge/cherry-pick conflict here, fix them and commit:

```
$ git commit -am 'Backport PR #31748: BUG: Fixed encoding of pd.NA with to_json'
```

4. Push to a named branch :

```
git push YOURFORK 1.0.x:auto-backport-of-pr-31748-on-1.0.x
```

5. Create a PR against branch 1.0.x, I would have named this PR:

> "Backport PR #31748 on branch 1.0.x"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
                