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 for SQL-like collection querying. 12+ examples covering select, where, joins, groupby, aggregates, and nested queries. Tested on Groovy 5.x. “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.” Paul Deitel, Java How to Program Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Intermediate | Reading Time: 25 minutes What is GINQ in Groovy? If you’ve ever ... 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.x. “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.” Roy Fielding, REST Dissertation Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Intermediate | Reading Time: 24 minutes Modern applications live and breathe APIs. Pulling ... 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.x. “JSON is the duct tape of the internet. Groovy’s JsonSlurper is the scissors that makes it easy to cut through.” Douglas Crockford, JavaScript: The Good Parts Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Beginner to Intermediate | Reading Time: 22 minutes If you work with web APIs, configuration files, or any modern ... Read More