Menu

property names with "class" ...

Help
Mike 2
2010-06-23
2013-05-02
  • Mike 2

    Mike 2 - 2010-06-23

    I have a bean property "className", which is stripped from the json results for my object. I think the same would happen to "classSize", "declassified", or any property name with the string "class" contained within it.

    I traced this to JsonViewWalkerInterceptor.visitElement, which has the following code:

    if ( pvPath.indexOf("class") >= 0 || pvPath.indexOf(UniqueIdGenerator.UNIQUE_ID_PROPERTY) >= 0) {
    return false;
    }

    Is it necessary for Spring-Json to strip such properties?

    Thanks,
    Mike

     
  • Kai Ulrich

    Kai Ulrich - 2010-06-25

    Hi Mike

    No, it is not necessary. We make this feature available by configuration in on e of the next releases.

     

Log in to post a comment.