[Dev] Best approach to send json array from ESB Connector

2014-09-09 Thread Tharik Kanaka
Hi all,

At the moment myself and pumudu (pum...@wso2.org) are developing wso2 esb
connector for codeplex. It has an operation to create subscription where we
need to send json array like below.

{
  "Events": [
{
  "Name": "Code Change",
  "Enabled": true,
  "Properties": [
{
  "Name": "summary",
  "Value": "True"
}
  ]
}
  ],
  "Properties": [
{
  "Name": "url",
  "Value": "http://test.com";
}
  ]

}

In that case what would be the best approach to handle json array?

01. get whole json array as a parameter from user
02. get properties as parameters from user and create json array inside
connector.

-- 

*Tharik Kanaka* | Associate Software Engineer

WSO2, Inc |#20, Palm Grove, Colombo 03, Sri Lanka

Mobile: +94 77 1616060   | Work: +94 112145345

Email: tha...@wso2.com | Web: www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Best approach to send json array from ESB Connector

2014-09-09 Thread Ramindu Deshapriya
Hi Tharik,

General practice for this has been to take the whole array from the user.

Please see [1] (Quickbooks connector)

Thanks.

[1] http://goo.gl/9cgx2S

On Wed, Sep 10, 2014 at 10:35 AM, Tharik Kanaka [via WSO2 Oxygen Tank] <
ml-node+s10903n10263...@n7.nabble.com> wrote:

> Hi all,
>
> At the moment myself and pumudu ([hidden email]
> ) are developing
> wso2 esb connector for codeplex. It has an operation to create subscription
> where we need to send json array like below.
>
> {
>   "Events": [
> {
>   "Name": "Code Change",
>   "Enabled": true,
>   "Properties": [
> {
>   "Name": "summary",
>   "Value": "True"
> }
>   ]
> }
>   ],
>   "Properties": [
> {
>   "Name": "url",
>   "Value": "http://test.com";
> }
>   ]
>
> }
>
> In that case what would be the best approach to handle json array?
>
> 01. get whole json array as a parameter from user
> 02. get properties as parameters from user and create json array inside
> connector.
>
> --
>
> *Tharik Kanaka* | Associate Software Engineer
>
> WSO2, Inc |#20, Palm Grove, Colombo 03, Sri Lanka
>
> Mobile: +94 77 1616060   | Work: +94 112145345
>
> Email: [hidden email]
>  | Web: www.wso2.com
>
> ___
> Dev mailing list
> [hidden email] 
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://wso2-oxygen-tank.10903.n7.nabble.com/Best-approach-to-send-json-array-from-ESB-Connector-tp102632.html
>  To start a new topic under WSO2 Development, email
> ml-node+s10903n3...@n7.nabble.com
> To unsubscribe from WSO2 Development, click here
> 
> .
> NAML
> 
>



-- 
Au revoir!
Ramindu Deshapriya.

Member - Sahana Software Foundation http://sahanafoundation.org
http://rdeshapriya.com

   


   




--
View this message in context: 
http://wso2-oxygen-tank.10903.n7.nabble.com/Best-approach-to-send-json-array-from-ESB-Connector-tp102632p102649.html
Sent from the WSO2 Development mailing list archive at Nabble.com.___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev