MCPcopy Create free account
hub / github.com/OperationT00/T-Code / extractJsonArg

Method extractJsonArg

src/main/java/com/tcode/agent/Agent.java:667–676  ·  view source on GitHub ↗
(String json, String key)

Source from the content-addressed store, hash-verified

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()) {

Callers 2

webSearchSummaryMethod · 0.95
webFetchSummaryMethod · 0.95

Calls 1

pathMethod · 0.80

Tested by

no test coverage detected