Search code examples
jsonzendeskzendesk-app

JSON List Syntax


I am using the Tickler app in our instance of Zendesk, and I am having a difficult time implementing a second automatic checklist. I am able to get one checklist to work, however, when I add the second checklist, neither work on my Zendesk tickets. After a lot of experimentation, I have been able to deduce that I have a JSON syntax problem.

The support team for the app is apparently on vacation, so they haven't been helpful. I'm not terribly familiar with JSON, either, so the support documentation is a bit confusing to me.

Here is the documentation for the app: https://support.lovestockleaf.com/hc/en-us/articles/204622930-Lovely-User-Guide#toc1

Here is a segment of code that works as expected:

{"my_tasklist":{"title":"List","tasks":[{"title":"Task 1"},{"title":"Task 2"},{"title":"Task 3"}]}}

When I try to add a second checklist, here is a bit of code that does not work at all. Note "my_tasklist" is identical in both:

{"my_tasklist":{"title":"List","tasks":[{"title":"Task 1"},{"title":"Task 2"},{"title":"Task 3"}]}}

{"my_tasklist2":{"title":"List","tasks":[{"title":"Task 1"},{"title":"Task 2"},{"title":"Task 3"}]}}

When using the second version of the JSON code, I am not able to use the tag "my_tasklist" nor "my_tasklist2", whereas if using the first version of the code, the tab "my_tasklist" will populate a checklist on the Zendesk ticket.

Hopefully, this question is clear enough. I'm very thankful for any help.


Solution

  • Your JSON object is wrongly formatted,below is correct one

    {
     "my_tasklist":{
     "title":"List",
     "tasks":[{"title":"Task 1"},{"title":"Task 2"},{"title":"Task 3"}]
     },
     "my_tasklist2":{
     "title":"List",
     "tasks":[{"title":"Task 1"},{"title":"Task 2"},{"title":"Task 3"}]
     }
    }