How to Ignore Certain Fields

  • Use the rule:json.rule.field.ignore

    • To ignore fields with a specific name:
    ## ignore field 'log'
    json.rule.field.ignore=log
    
    • To ignore fields of a specific type:
    ## ignore field 'log' typed xxx.xxx.Log
    json.rule.field.ignore=groovy:it.type().name()=="xxx.xxx.Log"
    
    • To ignore fields with a specific qualifier:
    #ignore transient field
    json.rule.field.ignore=groovy:it.hasModifier("transient")