I occasionally see queries on how to build JSON using outputs. I'd solved the problem a few times, so it was time to make it re-usable. It's pretty dumb, but it's all I need right now. Simple builder pattern, add the properties you want in the JSON output, then call toJson().