Results 1 to 2 of 2

Thread: XStreamJsonStringWriter Exception

  1. #1

    Default XStreamJsonStringWriter Exception

    some articles (http://spring-json.sourceforge.net/bindingxstream.html) suggesting we can skip model attributes by setting

    Code:
    <beans>
        <bean name="jsonView" class="org.springframework.web.servlet.view.json.JsonView">
                <property name="jsonWriter"><ref bean="jsonWriter"/></property>
        </bean>
            
        <bean name="jsonWriter"  class="org.springframework.web.servlet.view.json.writer.xstream.XStreamJsonStringWriter"">
            <property name="enableAnnotationConf"><value>true</value></property>
        </bean>
    </beans>

    But when I see the doc there is no property called "enableAnnotationConf" in XStreamJsonStringWriter, hence the following exception.

    Code:
    Error setting property values; nested exception is org.
    opertyException: Invalid property 'enableAnnotationConf' of bean class [org.springframework.web.servlet.view.json.writer.xstream.XStreamJsonStringWriter].
    'enableAnnotationConf' is not writable or has an invalid setter method.
    Anybody I have idea how to make this work?

    Thanks in advance.

  2. #2

    Default

    I found the solution

    updated jar from spring-json-1.2.jar to spring-json-1.2.1.jar

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •