--- C:\drupal\contributions\modules\json_server\json_server.module 
+++ C:\wamp\www\\sites\all\modules\json_server\json_server.module 
@@ -40,7 +40,12 @@
       if (is_array($result) && $result['#error'] === TRUE)
         return drupal_to_js(array('#error' => TRUE, '#data' => $result['#message']));
       
-      return drupal_to_js(array('#error' => FALSE, '#data' => $result));
+      if(function_exists('json_encode')) {
+        return json_encode(array('#error' => FALSE, '#data' => $result));
+      }
+      else {
+        return drupal_to_js(array('#error' => FALSE, '#data' => $result));
+      }
     }
   }
 
