Skip to content
New issue

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

Array support in response #11

Closed
jlopezr opened this issue Feb 28, 2014 · 3 comments
Closed

Array support in response #11

jlopezr opened this issue Feb 28, 2014 · 3 comments

Comments

@jlopezr
Copy link
Contributor

jlopezr commented Feb 28, 2014

Is it possible to specify an array of objects as a result of an operation?

@fliptoo
Copy link
Owner

fliptoo commented Apr 22, 2014

I never try on that, but usually the response class is a JSON model. If you want an array objects, i suggest you wrap the array into an object.

screen shot 2014-04-22 at 11 46 26 am

@krohrsb
Copy link

krohrsb commented May 21, 2014

I am configuring via yml and it appears it can be done.

for your responseClass just do array[Model]

e.g.,

responseClass: array[User]

just specify the model (User in this case) as you normally would.

@fliptoo
Copy link
Owner

fliptoo commented May 22, 2014

@BlackBarn Thanks!

@fliptoo fliptoo closed this as completed May 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants