Outputing a json file in drupal 6 I'm linking an android app with a drupal 6 server. Basically the app should be able to request information from the server to sync data and other simple functions. JSON is our preferred way of achieving this.

I've installed Service, JSON Server in drupal 6 and activated both node and view services. With views.get i'm able to get a JSON output of the default display from the view listed. 

Question(s)


First thing I'd like to achieve is to have the JSON output in a separate file. Completely. Currently the JSON is being shown below the views.get page. I've googled solutions for this but only found for drupal 7.
I'd like the JSON to receive arguments from the android app using POST. 


How can I achieve the two above.

Thank you very much.
Use Services Views

After enabling that resource you would be able to do call to

http://example.com/&lt;endpoint path&gt;/&lt;resource name&gt;


After enabling "views" resource in your services endpoint you can do GET request to:

http://example.com/&lt;endpoint path&gt;/views/&lt;view name&gt;


This will execute a view and pass results.

Possible arguments:
- display_id: views display
- args: array of view arguments
- filters: array of view filter values
- offset: views offset
- limit: limit views number of results
- format_output: boolean whether we would like to get themed view or data


Example of calls:

http://example.com/rest/views/articles?limit=5&amp;offset=2&amp;filters[tags]=5
http://example.com/rest/views/articles?filters[tags]=5&amp;display_id=block_1&amp;format_output=1