[JsonResponse] Silent only JSON errors

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | maybe
| Fixed tickets | #11415
| License       | MIT
| Doc PR        | n/a
Sure, that's the tricky part.

I can run `json_encode(null)` before to clear `json_last_error()`.
But it still possible to execute `json_encode` or `json_decode` inside a `JsonSerializable` object.