[ https://issues.apache.org/jira/browse/OFBIZ-5790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14182765#comment-14182765 ]
Jacopo Cappellato commented on OFBIZ-5790: ------------------------------------------ [~adri...@hlmksw.com] I am doing some progress on the cleanup and implementation of JSON converters but I have a concern. Are we sure that the "converter" framework is a good fit for the JSON integration? I am asking this because the client code (like the example that you have provided) that will get a conversion from/to a JSON string will still depend on a specific JSON object (the home grown org.ofbiz.base.json.JSON or net.sf.json.JSON or jackson...); we will have dependency on a specific JSON library and the additional complexity of the reflection based conversion framework. We could create a custom JSONString class that extends String and implement converters for it (in order to hide the specific JSON library within the conversion class); all the client code would depend on the JSONString class only. But maybe it would be easier to just implement a small set of static util methods that convert from/to a JSON string. > 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)