(String json, String key)
| 665 | } |
| 666 | |
| 667 | private String extractJsonArg(String json, String key) { |
| 668 | if (json == null || json.isBlank() || key == null || key.isBlank()) { |
| 669 | return ""; |
| 670 | } |
| 671 | try { |
| 672 | return new ObjectMapper().readTree(json).path(key).asText(""); |
| 673 | } catch (Exception e) { |
| 674 | return ""; |
| 675 | } |
| 676 | } |
| 677 | |
| 678 | private String compactOneLine(String text, int maxLength) { |
| 679 | if (text == null || text.isBlank()) { |
no test coverage detected