Groovy XML & JSON

Parsing and generating XML and JSON in Groovy. Tutorials on XmlSlurper, XmlParser, MarkupBuilder, JsonSlurper, JsonBuilder, and REST APIs.

Groovy GINQ – SQL-Like Collection Queries with 12 Tested Examples

Groovy GINQ gives you SQL-like collection querying without leaving the language. 12+ examples covering select, where, joins, groupby, aggregates, and nested queries. Tested on Groovy 5.0.6. “Why leave Groovy to write SQL when you can bring SQL into Groovy? GINQ lets you query collections like database tables – right in your code.” Last Updated: July 2026 | Tested on: Groovy 5.0.6, Java 17+ | Difficulty: Intermediate | Reading Time: 25 minutes What is GINQ in Groovy? If you’ve ever worked ... Read More

Groovy REST API Consumption – Fetch and Parse JSON with 10+ Examples

Groovy REST API consumption with 10+ examples. Fetch JSON with URL.text, HttpURLConnection, POST requests, headers, and error handling on Groovy 5.0.6. “The best thing about Groovy’s HTTP support is that you can hit an API and parse the response in two lines of code. Try doing that in plain Java.” Last Updated: July 2026 | Tested on: Groovy 5.0.6, Java 17+ | Difficulty: Intermediate | Reading Time: 24 minutes Modern applications live and breathe APIs. Pulling data from a third-party ... Read More

Groovy JSON Parsing with JsonSlurper – 10+ Tested Examples

Groovy JSON parsing with JsonSlurper. 10+ examples covering parseText, parse URL, nested fields, arrays, lazy parsing, and error handling on Groovy 5.0.6. “JSON is the duct tape of the internet. Groovy’s JsonSlurper is the scissors that makes it easy to cut through.” Last Updated: July 2026 | Tested on: Groovy 5.0.6, Java 17+ | Difficulty: Beginner to Intermediate | Reading Time: 22 minutes If you work with web APIs, configuration files, or any modern data exchange format, you work with ... Read More