We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I can't render results from search query in json format. Here is my code:
class Post { Integer id String title String type String content static constraints = { } static searchable = true } class PostController extends RestfulController { static responseFormats = ['json', 'xml'] PostController() { super(Post) } def search () { Map searchResults = Post.search("test") render searchResults } //Other methods.. }
It renders an Array. If i write render searchResults as JSON, it returns this {"total":6,"searchResults":{"empty":false}}
render searchResults as JSON
{"total":6,"searchResults":{"empty":false}}
Thanks in advance for your help ! R
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I can't render results from search query in json format.
Here is my code:
It renders an Array.
If i write
render searchResults as JSON
, it returns this{"total":6,"searchResults":{"empty":false}}
Thanks in advance for your help !
R
The text was updated successfully, but these errors were encountered: