如何在wso2 esb中连接两个JSON响应

时间:2016-02-03 10:35:23

标签: json wso2 esb

我需要连接的两个jsons将它转换为单个有效的json:

   {

    "first": true,
    "second": {
        "name": "manoj",
        "age": "45"
    },
    "third": {
        "fourth": [{

                "class": "test12",
                "salary": "123456"
            },

            {
                "class": "test23",
                "salary": "15678"
            }
        ],
        "fifth": "hello"
    }
   }

 [{
        "item1": "123456",
        "item2": "5678"

    },
  {
        "item1": "8976",
        "item2": "abcd"

    }]

是否可以在不使用任何jquery的情况下连接这两个。我需要与wso2 esb代码相关的东西。我尝试使用浓缩和其他调解员但到目前为止没有运气。

1 个答案:

答案 0 :(得分:3)

您可以使用WSO2 ESB Payload Factory介体连接jsons,如下所示,

    DEBUG [56b32b4c] Running /usr/bin/env if test ! -d /var/www/omega/current; then echo "Directory does not exist '/var/www/omega/current'" 1>&2; false; fi as deploy@XX.XX.XXX.X
    DEBUG [56b32b4c] Command: if test ! -d /var/www/xxxx/current; then echo "Directory does not exist '/var/www/xxxx/current'" 1>&2; false; fi
    DEBUG [56b32b4c]    Directory does not exist '/var/www/xxxx/current'
    cap aborted!
    SSHKit::Runner::ExecuteError: Exception while executing as deploy@XX.XX.XXX.X: if test ! -d /var/www/xxxx/current; then echo "Directory does not exist '/var/www/xxxx/current'" 1>&2; false; fi exit status: 1

请注意,我已经从mocky.io网站的模拟服务中检索了你的jsons。

感谢。