There is something strange with my service response running under JSON -SERVER.
When my function big results this works ok.

example:

   return array("resulsdfsdfsdfsdfsdfsdfsdfsdft1");
  // json response: {"#error":false,"#data":["resulsdfsdfsdfsdfsdfsdfsdfsdft1"]}

But if this throws a Broken JSON..

   return array("short");
  // json response: {"#error":false,"#data":["short

in this case there are no closing quotes. very strange.. (the same happens if I return an empty array or null)
Has to do with the response size ?

Working arround I will return sepecial first element of the array conaing only a big string.. but if you have a path for this would be great ..
Thx !

Comments

phpepe’s picture

Category: support » bug
skyredwang’s picture

Status: Active » Postponed (maintainer needs more info)

I can't reproduce this problem. If you can reproduce this problem on a fresh install, please let us know. Also, your client, platform, etc information is also helpful to debug this.

phpepe’s picture

What I can do right now is give you more details about our system.
( I need some more time to reproduce the problem on a fresh installation, and really I have a lot of work at this moment.. )
Server: Debian lenny
Drupal Version: Drupal 6
JsonServer Version : 6.x-2.0-alpha1
Services Version: 6.x-2.0
Service: My custom module services returning 'struct' data.

Client: iPhone (os v4).. The same happens on my test ajax call.. so I dont think is so important the cli patform.

After finishing the projects i'm evolved, I could take some time to help with this module, that really will have a great future.

Thanks !

skyredwang’s picture

Can you try JSONServer 6.x-2.0-alpha2 instead?

phpepe’s picture

Yes,
I tried updating to alpha2 but, I got more errors that I dont remember exactly right now, so that's why I decided to continue with this version, with little workarounds (client and server side fixes).
Currently the system is on a very advanced stage, and an update needs Php changes (easy) for my drupal service,
and Objective-C for the iphone client (no so easy for me ;)

Thanks for your quick response.