[
https://issues.apache.org/jira/browse/OFBIZ-3365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacopo Cappellato updated OFBIZ-3365:
-------------------------------------
Affects Version/s: (was: Release Branch 09.04)
(was: Release Branch 4.0)
Fix Version/s: (was: Release Branch 09.04)
(was: Release Branch 4.0)
> Clean JSON Service Event Handler
> --------------------------------
>
> Key: OFBIZ-3365
> URL:
https://issues.apache.org/jira/browse/OFBIZ-3365> Project: OFBiz
> Issue Type: Improvement
> Components: framework
> Affects Versions: SVN trunk
> Reporter: Frank Lam
> Assignee: Scott Gray
> Priority: Minor
> Fix For: SVN trunk
>
> Attachments: cleanjson.patch
>
>
> I ran into a small issue while using org.ofbiz.webapp.event.JSONServiceEventHandler (typically referred to as "jsonservice" in controller files). If I defined my service as such:
> <service name="foo" engine="java" location="my.Class" invoke="someFunction">
> <attribute name="mylist" mode="OUT" type="List" optional="true"/>
> </service>
> I would get the following in the content of my response:
> {"targetRequestUri":"/foo","thisRequestUri":"foo","mylist":[{some:stuff}],"multiPartMap":{},"_CONTROL_PATH_":"/myapp/control","_CONTEXT_ROOT_":"/Users/me/Documents/workspace/ofbiz/hot-deploy/mycomponent/webapp/myapp/","_SERVER_ROOT_URL_":"
http://localhost:8080"}
> where I would prefer to receive simply:
> {"mylist":[{some:stuff}]}
> I've added another event handler to try to resolve this problem. The patch is attached.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspaFor more information on JIRA, see:
http://www.atlassian.com/software/jira