Hi Andrés,

On 2 November 2013 21:19, andresgomez92 <andresgome...@gmail.com> wrote:

> Hello,
>
> I have a question about the method onEventCall (), on the input event
> adapters.
>
> If I want to map using JSON in the builder. Should I use a JSON string in
> this method?
>
>
> *For example:
>
> String event = {"Name":"Andres", "Number":20};
>
> inputEventAdaptorListener.OnEventCall(event);
> *
>
Yes, you need to pass a JSON String similar to above when sending in JSON
events.

>
> Then I would do the following:
>
> <img src='http://img600.imageshack.us/img600/2629/4btt.png' border='0'/>
> <http://imageshack.us/photo/my-images/600/4btt.png/>
>

To use the event builder with mapping type as JSON, you need to specify a
JSON path query (like as you would specify an XPath for XML).

You can find a sample JSON event builder mapping in [1]. You can also find
some examples for JsonPath syntax in [2] and [3].

CEP actually uses the library in [2] to process JsonPath underneath.

[1] http://docs.wso2.org/display/CEP300/JSON+Event+Builder
[2] https://code.google.com/p/json-path/
[3] http://goessner.net/articles/JsonPath/

HTH,
Lasantha


> Andrés Gómez
>
>
>
>
>
> --
> View this message in context:
> http://wso2-oxygen-tank.10903.n7.nabble.com/Input-Event-Adaptor-Event-Builder-CEP-3-0-0-method-onEventCall-tp87973.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
>



-- 
*Lasantha Fernando*
Software Engineer - Data Technologies Team
WSO2 Inc. http://wso2.com

email: lasan...@wso2.com
mobile: (+94) 71 5247551
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to