json services
JSON Server adds unwanted backslashes
I'm using JSON in Flash (because I'm also using JSON for iPhone and wanted to keep things consistent rather than mixing amf and JSON). I noticed that when I started using the JSON Server for the Services module that strings with apostrophes were getting slashes where they didn't belong. Check out the return differences between these:
<?php
//outputs didn't
echo json_encode("didn't");
//outputs didn\'t
echo drupal_to_js("didn't");
?>Simple use of Services with JSON
I am trying a simple test with Drupal 6, Services, JSON Server but am running into the following error. To make things as simple as possible, I tried this with the curl command line program (although I have also tried it in python and php). I have services and json server installed and can go to services at mysite.com/admin/build/services/browse/service.name and successfully browse a view I made using views.get. I also did this with node.get However (all on the same machine) when I try:
curl --data method=views.get --data view_name="myview" http://mysite/services/json
or
