$subject any objections ?
   This has to be done due to some JSONPhaser limitation which is not fixed
either at the latest jettision version which is critical and blocker.

*ISSUES*

*[1]* If  received json response as follows [1.1]  and
Jettision phrase failed to convert *<16x16> ,**<24x24> .. * since
those aren't valid XML representation,due to that reason we can do any
content base operation on json responses received from JIRA..


[1.1]
       
{"self":"xxxj<https://wso2.org/jira/rest/api/2/[email protected]>xxxxxx","key":"gggggg,"name":"kkkkk","emailAddress":"xxx
at xxdot
com","avatarUrls":{"16x16":"yyyyy","24x24":"mmmm","32x32":"mmmmm","48x48":"ccccc"},"displayName":"nnnnnn","active":true,"timeZone":"Asia/Colombo","groups":{"size":3,"items":[]},"expand":"groups"}


corresponding XML suppose to be

<self>xxxxxx</self> <key>x <[email protected]>xxxx</key>
<name>n<[email protected]>nnnnn</name>
<emailAddress>xxxxx</emailAddress> <avatarUrls> *<16x16>cccc</16x16>
<24x24>kkkk</24x24> <32x32ccccc</32x32> <48x48>bbbbb</48x48>* </avatarUrls>
<displayName>xxxxxx</displayName> <active>true</active>
<timeZone>Asia/Colombo</timeZone> <groups> <size>3</size> </groups>
<expand>groups</expand>


*Fix*

*MappedXMLStreamReader in Jettision 1.1*

  } else {
                nextKey = (String) node.getKeys().next();
             *   Matcher matcher = degitPattern.matcher(nextKey);*
*                newObj = node.getObject().get(nextKey);*
*                if(matcher.matches()){*
*                 nextKey = "_"+nextKey;*
*                }*
*            }*

a simple fix and it works


the response now looks as follows


{
   "self": 
"https://xxxxx/jira/rest/api/2/user?username=<https://wso2.org/jira/rest/api/2/[email protected]>
xxxxxxx",
   "key": "[email protected] <[email protected]>",
   "name": "dx <[email protected]>xxx",
   "emailAddress": "xxxxxxx",
   "avatarUrls":    {
    *  "_16x16":
"xxxxxxxavatarId=10142<https://wso2.org/jira/secure/useravatar?size=xsmall&avatarId=10142>
",*
*      "_24x24":
"sssssss=10142<https://wso2.org/jira/secure/useravatar?size=small&avatarId=10142>
",*
*      "_32x32":
"yyyyyy10142<https://wso2.org/jira/secure/useravatar?size=medium&avatarId=10142>
",*
*      "_48x48":
"nnnnnnn=10142<https://wso2.org/jira/secure/useravatar?avatarId=10142>
"*
   },
   "displayName": "xx xxx",
   "active": "true",
   "timeZone": "Asia/xxx",
   "groups": {"size": "3"},
   "expand": "groups"
}



cheers,
Dushan Abeyruwan
Associate Tech Lead
*Integration Technologies Team*
*WSO2 Inc. http://wso2.com/*
*Mobile:(+94)714408632*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to