(@Nullable Object input, int maxDepth, int depthRemaining)
| 398 | } |
| 399 | |
| 400 | private JsonOutput write0(@Nullable Object input, int maxDepth, int depthRemaining) { |
| 401 | if (input == null) { |
| 402 | append("null"); |
| 403 | return this; |
| 404 | } |
| 405 | converters.entrySet().stream() |
| 406 | .filter(entry -> entry.getKey().test(input.getClass())) |
| 407 | .findFirst() |
| 408 | .map(Map.Entry::getValue) |
| 409 | .orElseThrow(() -> new JsonException("Unable to write " + input)) |
| 410 | .consume(input, maxDepth, depthRemaining); |
| 411 | |
| 412 | return this; |
| 413 | } |
| 414 | |
| 415 | /** |
| 416 | * {@inheritDoc} |
no test coverage detected