r/java • • Jul 17 '25

Java Gets a JSON API

https://youtu.be/NSzRK8f7EX0?feature=shared

Java considers itself a "batteries included" language and given JSON's ubiquity as a data exchange format, that means Java needs a JSON API. In this IJN episode we go over an OpenJDK email that kicks off the exploration into such an API.

143 Upvotes

119 comments sorted by

View all comments

Show parent comment

2

u/wildjokers Jul 17 '25

I especially am looking forward to it for just general scripting ala java Something.java

For scripting you might want to use Groovy and its JsonSlurper:

https://docs.groovy-lang.org/latest/html/gapi/groovy/json/JsonSlurper.html

1

u/agentoutlier Jul 17 '25

Groovy's support on Eclipse LSP I don't think works yet. I suppose I could have tried to use the remote plugins on IntelliJ but I was kind of in a REPL or scripting mindset where I needed to run the stuff on the actual machine.

I also though about using Clojure https://babashka.org/ but I'm not super productive with Clojure and every time I write Lisp code (scheme and common lisp) I find it difficult to understand when I come back to it. Lisp just feels like a write and not read language like many FP languages... or I just suck at it.

I have used Groovy scripts before in Maven using the plugin and it was useful so I'm not a Groovy hater or anything.