We use Drupal 7 and the Service (Version 3) module. First we created a view using a date with a "between operator" as a filter, which works fine. Then we added a service view as .json format inn which we try to pass that date operator in the query string of it, but we cannot get that to work.
The query string we are using looks similar to this example:
http://example.com/drupal/api(endpoint)/sampleview.json?field_invoice_date_value<='2013-12-31'&field_invoice_date_value>='2013-11-31'
To produce the output of the view in json format, we used the (amazing!) Services Views module. We added the service view path to the services resource. As mentioned above, the date filtering is working fine in the view (as confirmed by our testing of the view, without using JSON). But if we try using JSON then the between operator for the date is for unknown reasons not (yet) working.
Below are 5 screenshots to further explain what we're trying to implement (and what we got to work so far).
1. Service View
2. Date filter
3. View output
4. Adding service view as service resource
5. JSON query string variations
http://web.com/drupal/api[endpoint name]/chart(view service pathname).json?field_invoice_date_value>=2013-11-01&field_invoice_date_value_1<=2013-12-31
The above string is NOT working, note the filter in it like so:
"field_invoice_date_value>=2013-11-01&field_invoice_date_value_1<=2013-12-31"
Other filters are working correctly, like this one:
http://web.com/drupal/api[endpoint name]/chart(view service pathname).json?facility_name_value='test'
Since we need the JSON output using that 'between date', we also tried this variation, which is NOT working either:
http://web.com/drupal/api[endpoint name]/chart(view service pathname).json?field_invoice_date_value='20131210--20131213'
When testing with the string above, we received the following error message too:
"Cannot create references to/from string offsets nor overloaded objects in common.inc on line 6579"
My question: Please let me know how to implement the date between operator in a JSON query string, or any other ideas you have to further debug this issue.