2

I am designing a REST API which would need to bee sorted on multiple parameter.

I am trying to use something like http://books?sort=+author,-datepublished

But I don't know how to write a custom QueryParam to parse the sort.

4
  • This is a Springboot project? Commented Nov 30, 2017 at 18:37
  • @EleazarEnrique Yes working on Spring Commented Nov 30, 2017 at 18:50
  • Take at look here: stackoverflow.com/a/33034533/1715121 Commented Nov 30, 2017 at 18:54
  • Yeah I had a look at it. the problem is I don't wanna specify sort a number of time in my url. I wanna use single sort with multiple values where - denotes ASC and + denote DESC Commented Nov 30, 2017 at 19:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.