Support for views_field_view module will make huge difference here. It will be possible to alter the output of the Services Views module to simpler more readable format for entityreference and field collections and probably many more modules.

When using views_field_view field as a field inside a services display view, it's not displayed at all in the output XML.
Here's what I did:

I have a content type "Parent" with fields "title & image". The image field allows multiple values. Another content type "Child". Child has an entity reference field to parent.

I want to output json like this:

[
{
"nid":"XX",
"title":"Father",
"image":[
{"uri":"http://XX.XX.XX.XX/domain/image1.jpg"}
{"uri":"http://XX.XX.XX.XX/domain/image2.jpg"}
]
"children":[
{
"nid":"XX",
"title":"Child 1",
},
{.....}
]
}
{....}
]

If I can find to add proper support to views_field_view to render the return of the field as array then I think I will solve this problem.

CommentFileSizeAuthor
cofeetable.jpg68 bytesSunflower
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mudddy’s picture

+1

Were you able to get anywhere on this? I'm happy to pitch in.. just trying to figure out where to start.