Consider just `else`ing here into another method like `serialiseNonDateTimeProperty` and make the decision of `shouldSerialiseProperty` in there;

```
private buildJSON = { obj ->

    obj.properties.each { propName, propValue ->

        if (propValue instanceof DateTime) {
            setProperty(propName, ISODateTimeFormat.dateTime().print(propValue))
        }
        else {
            serialiseNonDateTimeProperty(propName)
        }       
    }
}

def serialiseNonDateTimeProperty(propName) {
    if (shouldSerialiseProperty(propName)) {

        if (isSimple(propValue)) {
            // It seems "propName = propValue" doesn't work when propName is dynamic so we need to
            // set the property on the builder using this syntax instead
            setProperty(propName, propValue)
        }
        else {
            // create a nested JSON object and recursively call this function to serialize it
            Closure nestedObject = {
                buildJSON(propValue)
            }
            setProperty(propName, nestedObject)
        }
    }
}
```