[ 
https://issues.apache.org/jira/browse/OFBIZ-5790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14183999#comment-14183999
 ] 

Jacopo Cappellato commented on OFBIZ-5790:
------------------------------------------

[~adri...@hlmksw.com], I don't remember what [~jonesde] said about this topic 
but I think we can all agree that code like the following is not super sexy too 
(and requires the usage of static methods too):

{code}
Converter<Map, org.ofbiz.base.json.JSON> converter = 
Converters.getConverter(Map.class, org.ofbiz.base.json.JSON.class);
org.ofbiz.base.json.JSON json = converter.convert(attrMap);
String jsonString = json.JSONString();
{code}

I would recommend that we all stay open to different proposals and designs and 
their pros and cons, even if they are different from what we initially thought, 
instead of stepping back.
By the way, I will complete my work, that uses the conversion framework as you 
have recommended, in the experimental branch and then we will see if it makes 
sense to use a simpler approach instead.

> 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, JSON.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)

Reply via email to