Two Laptop Bag*
The moose likes SOA and ESB and the fly likes Filter on REST Agent to return selective/partial JSON Data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » SOA and ESB
Bookmark "Filter on REST Agent to return selective/partial JSON Data" Watch "Filter on REST Agent to return selective/partial JSON Data" New topic
Author

Filter on REST Agent to return selective/partial JSON Data

Faraz Ka
Ranch Hand

Joined: Jun 01, 2013
Posts: 53
Hi,

I have a REST Agent that returns the response in the form of JSON Array.

Initially the URL is like http://localhost:8080/bookshelf/book/author->; This returns all the data
Next, the filtering is needed like http://localhost:8080/bookshelf/book;name=Quite/author;name=Susan -> Here filtering is done on book and name fields

Any clue what is the best way to achieve this filtering?

Thanks,
Faraz
Roger Sterling
Ranch Hand

Joined: Apr 06, 2012
Posts: 426

Faraz Ka wrote:Hi,

I have a REST Agent that returns the response in the form of JSON Array.

Initially the URL is like http://localhost:8080/bookshelf/book/author->; This returns all the data
Next, the filtering is needed like http://localhost:8080/bookshelf/book;name=Quite/author;name=Susan -> Here filtering is done on book and name fields

Any clue what is the best way to achieve this filtering?

Thanks,
Faraz


REST url parameters are specified thusly : http://localhost:8080/bookshelf/book?book_name=quite;author_name=Susan

http://www.ietf.org/rfc/rfc3986.txt

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Filter on REST Agent to return selective/partial JSON Data