invalid return from DELETE tasks

7 views
Skip to first unread message

NeilB

unread,
Jun 9, 2011, 4:50:44 PM6/9/11
to checkvist-api
When deleting a task, I'm getting invalid JSON back. Here's the URI:

http://checkvist.com/checklists/69818/tasks/3005948.json?token=NNNNNN

And the JSON I get back is:

{
"id": 3005948,
"parent_id": 0,
"checklist_id": 69818,
"status": 0,
"position": ,

"content": "Code another method",
"tasks": [],
"update_line": "deleted by neilb",
"updated_at": "2011/06/09 20:39:14 +0000",

"collapsed": false,
"comments_count": 0,
"deleted": true,
"details": {},
"tags": {},
"due": null
}

Note that the "position" field doesn't have a legal value (according
to http://www.json.org), so trying to deserialize it fails.

Given the position is defined as "1 - based position of the task under
its parent", options are:

(1) return position as 0 or -1
(2) return position as null
(3) don't included position in the return value

My vote would be for (3), failing that (1).

Neil

KIR

unread,
Jun 9, 2011, 5:19:44 PM6/9/11
to checkvist-api
Neil, thanks for the bug report!
I've fixed the problem and will put the fix to the production server
on this weekend.

Thanks again!

On Jun 9, 10:50 pm, NeilB <n...@bowers.com> wrote:
> When deleting a task, I'm getting invalid JSON back. Here's the URI:
>
>  http://checkvist.com/checklists/69818/tasks/3005948.json?token=NNNNNN
>
> And the JSON I get back is:
>
>       {
>         "id": 3005948,
>         "parent_id": 0,
>         "checklist_id": 69818,
>         "status": 0,
>         "position": ,
>
>         "content": "Code another method",
>         "tasks": [],
>         "update_line": "deleted by neilb",
>         "updated_at": "2011/06/09 20:39:14 +0000",
>
>         "collapsed": false,
>         "comments_count": 0,
>         "deleted": true,
>         "details": {},
>         "tags": {},
>         "due": null
>       }
>
> Note that the "position" field doesn't have a legal value (according
> tohttp://www.json.org), so trying to deserialize it fails.

Neil Bowers

unread,
Jun 9, 2011, 5:31:24 PM6/9/11
to checkv...@googlegroups.com
Neil, thanks for the bug report!
I've fixed the problem and will put the fix to the production server
on this weekend.

That was quick!

Another thought occurred to me:

When deleting a task, I'm getting invalid JSON back. Here's the URI:

 http://checkvist.com/checklists/69818/tasks/3005948.json?token=NNNNNN

And the JSON I get back is:

      {
        "id": 3005948,
        "parent_id": 0,
        "checklist_id": 69818,
        "status": 0,

status currently has legal values:

0-open, 1-closed, 2-invalidated

Maybe the return shouldn't have status of "open". Ok, you can check the return field "deleted",
but I think all fields should be consistent. 3-deleted?

Thanks,
Neil

KIR

unread,
Jun 9, 2011, 5:46:38 PM6/9/11
to checkv...@googlegroups.com
Neil, 

  Currently, the deleted tasks have explicit "deleted" attribute. I'm afraid, we won't change this API to 
  avoid problems with existing clients.

  Thanks for the suggestion anyway :)

  KIR

--
You received this message because you are subscribed to the Google Groups "checkvist-api" group.
To post to this group, send email to checkv...@googlegroups.com.
To unsubscribe from this group, send email to checkvist-ap...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/checkvist-api?hl=en.



--

Kirill (KIR) Maximov

Software Engineer & Starter


Email:         k...@checkvist.com

Twitter:       maxkir

Skype:        maxkir

Web site:    http://checkvist.com

                  http://kirblog.idetalk.com

                  http://www.jetbrains.com/teamcity



Reply all
Reply to author
Forward
0 new messages