[ https://issues.apache.org/jira/browse/OFBIZ-5790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14181069#comment-14181069 ]
Jacopo Cappellato commented on OFBIZ-5790: ------------------------------------------ [~lektran] I like the idea of using a special view handler for the formatting of the JSON response, it was my first thought too. Apart from this detail, I would also like to better understand the requirements related to service calls and JSON, specifically: # responses: the idea of a JSON view-handler or the current implementation of jsonResponseFromRequestAttributes both have the same advantage/limitation: they convert to JSON the whole list of request attributes (ok, not all of them since we have a blacklist of attributes that are removed); they do not focus on the service OUT attributes; should we consider an implementation of JSON closer to the service invocation that solely focus on service OUT parameters? what are the use cases for JSON responses that we should consider? # requests: this thicket is about invoking a service using a JSON string as the input map; [~amardeepsj] (or others) could you please provide the use cases where this feature will be used? again, are we looking to pass to a service a JSON string as its input, or we should also consider something like JSON-RPC? > Json string parameters as a service input are not recognized by OFBiz > ServiceEventHandler. > ------------------------------------------------------------------------------------------ > > Key: OFBIZ-5790 > URL: https://issues.apache.org/jira/browse/OFBIZ-5790 > Project: OFBiz > Issue Type: Improvement > Affects Versions: Trunk > Reporter: Amardeep Singh Jhajj > Priority: Minor > Attachments: CommonEvents.java.patch, OFBIZ-5790.patch, > jackson-annotations-2.4.0.jar, jackson-core-2.4.2.jar, > jackson-databind-2.4.2.jar > > > I was trying to pass the Json string as a input to a service, but is not > recognized by ServiceEventHandler. > Example Json String- {"faciltyId": "WebStoreWarehouse"} > I worked on this issue and attached a patch here. Here I have used Jackson > Json library for parsing. -- This message was sent by Atlassian JIRA (v6.3.4#6332)