1

I am using Services Views to render JSON for a view that has a views_field_view. The JSON output from Services for the views_field_view field is currently a rendered HTML view. How can I make views_field_view render a JSON version of the output to be included with the parent view's JSON output?

UPDATE:

The content in the sub-view has a Geofield, which is causing problems in a Services display. The view is set as an unformatted list. A Page display looks like this:

node_title: Marquette
Geofield: 44.977297200000, -93.270110200000

Then if I create a Services display with the same view (same fields), the output looks like this:

  stdClass::__set_state(array(
     'node_title' => 'Marquette',
     'nid' => '1335',
  ))

In a Services display, anything I try to do with a Geofield just outputs the nid.

  • 2
    I think you'd need to create a services display for the child view, then when it's rendered it should contain json – Clive Aug 13 '13 at 17:52
1

This was an issue with custom fields in Services Views that has been fixed in the latest dev version.

https://drupal.org/node/1647270

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.