Add jbang: single-file Java with JBang 0.132.1 on JDK 25 (deps, compact source files, Spring Boot, templates, native)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6ZEVHGaYy15HAxRzy
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
7c677a39d2
commit
ddc3ec9d90
@@ -0,0 +1,14 @@
|
||||
//JAVA 25+
|
||||
//DEPS tools.jackson.core:jackson-databind:3.3.0
|
||||
|
||||
import tools.jackson.databind.SerializationFeature;
|
||||
import tools.jackson.databind.json.JsonMapper;
|
||||
|
||||
/** Reads JSON on stdin, writes it back pretty-printed. A tiny jq-lite in one file. */
|
||||
public class Pretty {
|
||||
public static void main(String[] args) throws Exception {
|
||||
var mapper = JsonMapper.builder().enable(SerializationFeature.INDENT_OUTPUT).build();
|
||||
var tree = mapper.readTree(System.in);
|
||||
System.out.println(mapper.writeValueAsString(tree));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user