DOC: update the to_json() docstring
State: closed

Fixes validation errors and adds an example for each orientation.

- [ x] PR title is "DOC: update the <your-function-or-method> docstring"
- [ x] The validation script passes: `scripts/validate_docstrings.py <your-function-or-method>`
- [ x] The PEP8 style check passes: `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x ] The html version looks good: `python doc/make.py --single <your-function-or-method>`
- [x ] It has been proofread on language by another sprint participant

```
Errors found:
	Missing description for See Also "pandas.read_json" reference
	Examples do not pass tests
```

I'm not able to make this pass.

Labels:
name: Docs

Comments:
@samuelsinayoko
@gioiab
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20149?src=pr&el=h1) Report
> Merging [#20149](https://codecov.io/gh/pandas-dev/pandas/pull/20149?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/840d4323935348a890d6b868f2b18e8dddd22199?src=pr&el=desc) will **increase** coverage by `0.03%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/20149/graphs/tree.svg?width=650&height=150&src=pr&token=eZ4WkYLtcO)](https://codecov.io/gh/pandas-dev/pandas/pull/20149?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #20149      +/-   ##
==========================================
+ Coverage   91.72%   91.76%   +0.03%     
==========================================
  Files         150      150              
  Lines       49156    49148       -8     
==========================================
+ Hits        45090    45099       +9     
+ Misses       4066     4049      -17
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.14% <100%> (+0.03%)` | :arrow_up: |
| #single | `41.9% <100%> (+0.04%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/20149?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/20149/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `95.85% <100%> (+0.01%)` | :arrow_up: |
| [pandas/core/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/20149/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYmFzZS5weQ==) | `96.78% <0%> (-0.02%)` | :arrow_down: |
| [pandas/core/algorithms.py](https://codecov.io/gh/pandas-dev/pandas/pull/20149/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYWxnb3JpdGhtcy5weQ==) | `94.17% <0%> (-0.01%)` | :arrow_down: |
| [pandas/core/window.py](https://codecov.io/gh/pandas-dev/pandas/pull/20149/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvd2luZG93LnB5) | `96.3% <0%> (-0.01%)` | :arrow_down: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/20149/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `93.85% <0%> (-0.01%)` | :arrow_down: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/20149/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.66% <0%> (-0.01%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/20149/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.64% <0%> (ø)` | :arrow_up: |
| [pandas/core/groupby.py](https://codecov.io/gh/pandas-dev/pandas/pull/20149/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS5weQ==) | `92.14% <0%> (ø)` | :arrow_up: |
| [pandas/core/strings.py](https://codecov.io/gh/pandas-dev/pandas/pull/20149/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3RyaW5ncy5weQ==) | `98.32% <0%> (ø)` | :arrow_up: |
| [pandas/core/indexes/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/20149/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy90aW1lZGVsdGFzLnB5) | `91.03% <0%> (ø)` | :arrow_up: |
| ... and [14 more](https://codecov.io/gh/pandas-dev/pandas/pull/20149/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20149?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20149?src=pr&el=footer). Last update [840d432...579532a](https://codecov.io/gh/pandas-dev/pandas/pull/20149?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@robmarkcole Thanks for the PR!