ForumsDevelopersJSON Return types


JSON Return types
Author Message
paulo_1304971458

Posted: May 29, 2011
Score: 0 Reference
According to the documentation, tasks priorities should be integers.
Nonetheless, they are returned inside quotes, as a string, which causes all sort of trouble while processing.
Worst yet, the date and time field come as an INT if set but as a "0" string if not set...
Is this behaviour correct? I'm using json-glib to do the parsing.
Actually, it's no problem if all values are returned as strings, as long as this is consistent.

Yours,
Paulo Schreiner
Jake

Toodledo Founder
Posted: May 31, 2011
Score: 0 Reference
We may have a few inconsistencies returning integers as strings. I will check on that and get them fixed, but to be safe you could always do a type check and convert strings to integers in your code when necessary. Try to avoid making an assumption on the data type so that if we fix the bug your app won't crash.
paulo_1304971458

Posted: Jun 01, 2011
Score: 0 Reference
Thanks!
You cannot reply yet

U Back to topic home

R Post a reply

To participate in these forums, you must be signed in.