tutorial

Step-by-step Groovy tutorials for developers of all skill levels.

Groovy JSON Output with JsonOutput and JsonBuilder – 10+ Tested Examples

Groovy JSON output with JsonOutput, JsonBuilder, and StreamingJsonBuilder. 10+ examples for generating JSON from maps, objects, and lists on Groovy 5.x. “Parsing JSON is half the battle. The other half is generating it cleanly – and Groovy gives you three different tools to do just that.” Douglas Crockford, JSON Specification Author Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Beginner to Intermediate | Reading Time: 22 minutes You’ve parsed JSON with JsonSlurper. Now you need ... Read More

12 Groovy XmlSlurper Examples – Parse XML the Easy Way

Groovy XmlSlurper is explored here with 12 practical examples covering XML parsing, namespaces, attributes, GPath queries, and real-world patterns. Tested on Groovy 5.x. “XML is like violence – if it doesn’t solve your problems, you’re not using enough of it.” Tim Berners-Lee, Web Standards Pioneer Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Intermediate | Reading Time: 20 minutes If you’ve wrestled with DOM parsers, SAX handlers, or JAXB annotations just to pull a few ... Read More

Groovy XmlParser vs XmlSlurper – Complete Comparison with 12 Examples

Compare Groovy XmlParser and XmlSlurper with 12 side-by-side examples. Learn when to use each, performance differences, and migration tips. Groovy 5.x. “There are only two hard things in Computer Science: cache invalidation, naming things, and choosing the right XML parser.” Every Java Developer, Eventually Last Updated: March 2026 | Tested on: Groovy 5.x, Java 17+ | Difficulty: Intermediate | Reading Time: 20 minutes Groovy gives you two built-in XML parsers: Groovy XmlParser and XmlSlurper. They look similar at first glance ... Read More