Support Non-Domain Class POGOs

Issue #1 resolved
Jason Stonebraker
repo owner created an issue

As a user of the JsonExclusionMarshaller plugin
I want to be able to apply the excludeFor*() method to any pogo (not just Grails Domain Classes)
So that I can benefit from the plugins functionality on a larger range of classes

Currently the injected marshaller assumes the existence of the 'id' and 'class' properties. This reduces the use of the plugin to GORM enhanced Domain Classes.

This enhancement will follow the original GroovyBeanMarshaller's method of determining which properties should be included in the original map, prior to the excluding the specified properties.

Acceptance Criteria:
Given an instance of a TestStudent class
When I use the excludeFor*() method and specify the socialSecurityNumber property for exclusion
Then the result of the JSON conversion should be:



student = new TestStudent([
    firstName: "Tobias",
    lastName: "Funke",
    gradePointAverage: 3.6,
    studentID: "FS-210-7312",
    socialSecurityNumber: "555-55-5555" 

Comments (3)

  1. Log in to comment