ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

Add function support for evaluating a dynamic path against a payload. #377

Closed rbiw closed 1 year ago

rbiw commented 6 years ago

Add a function to support evaluating JSON path against JSON payloads, XPath against XML payloads, and perhaps Regex against String payloads. Make it generic to handle extension in future for other payload types.

Discussed briefly on Slack with @sanjiva

shafreenAnfar commented 6 years ago

Hi @rbiw, thanks for the suggestion and we will consider this for one of our future release. In case you are interested, you can easily implement it by writing native functions which wraps java code. Then you can publish it to Ballerina central so that everyone can benefit from it.

Please refer following links where you can get an idea about how to implement native functions.

https://github.com/ballerina-platform/ballerina-lang/blob/master/stdlib/ballerina-builtin/src/main/ballerina/crypto/natives.bal

https://github.com/ballerina-platform/ballerina-lang/blob/master/stdlib/ballerina-builtin/src/main/java/org/ballerinalang/nativeimpl/crypto/Hash.java

Also please refer the contributing guide as well.

riyafa commented 6 years ago

In addition to these it would be nice to support the query languages XQuery and JSONiq for XML and JSON.

raj-rajaratnam commented 6 years ago

Any progress on this effort?

dhayalramk commented 5 years ago

What is the slack link?

Showing 404 for https://ballerina.io/community/slack/

pubudu91 commented 5 years ago

@dhayalramk Try this link: https://ballerina.io/community/slack

dhayalramk commented 5 years ago

@pubudu91 Thank you :)

shafreenAnfar commented 1 year ago

Closing this issue as Ballerina has other ways to navigate JSON and XML. Besides, this is not a HTTP module related issue.