Tracked Items in the API payload not JSON-serializeable

Chris Hacker's Avatar

Chris Hacker

11 Nov, 2015 05:48 PM

I am using sharpy to connect to the api and just attempted to add a Tracked Item to product settings. That changed the payload by including a new key 'items'. However the value of the Tracked Item in the 'items' object is not JSON serializable and it crashes the process as a result. I've removed the tracked item from my product config for now. Is this a known issue? Below is the offending line of the payload as received from CG's API.

'items': {'txclosed': Item: txclosed for Subscription: CUSTOMER_CODE_REMOVED},

  1. Support Staff 1 Posted by Marc Guyer on 11 Nov, 2015 08:42 PM

    Marc Guyer's Avatar

    Hi Chris -- I'm not sure what that would be. Since you've removed the item, I can't really troubleshoot it. My first guess is that there may have been an invalid UTF8 sequence in the item code value. Not sure how that could be but the JSON spec says that everything is supposed to be UTF8. That's really just a shot in the dark at this point. If you continue to have a problem, let me know.

  2. 2 Posted by Chris Hacker on 13 Nov, 2015 04:15 AM

    Chris Hacker's Avatar

    Marc,

    Thanks for responding. I'll test again off hours, but I couldn't leave the tracked item in as it caused the entire application's connection to CG to break on production simply by having it exist. The problem is that this:

    {'txclosed': Item: txclosed for Subscription: CUSTOMER_CODE_REMOVED}

    is not valid JSON. Either of the following would be, or some other combo:

     {'txclosed': 'Item: txclosed for Subscription: CUSTOMER_CODE_REMOVED'} 
    {'txclosed': {Item: {'txclosed for Subscription': 'CUSTOMER_CODE_REMOVED'}}}
    

    I'll let you know what happens when I try again.

  3. Support Staff 3 Posted by Marc Guyer on 13 Nov, 2015 03:44 PM

    Marc Guyer's Avatar

    Hi Chris -- It sound's like you might want to setup a dev/test account in CG.

    Maybe also consider trying the smartfile version which appears to be more up-to-date.

  4. 4 Posted by Chris Hacker on 13 Nov, 2015 08:43 PM

    Chris Hacker's Avatar

    Yep. Saw the smartfile version. Looks like they've done some of the same
    updates we've done, plus some others. We'll be looking into it.

    Christopher Hacker

    <https://myshorttrack.com>

    (773) 313-3169 o

    (312) 205-0188 f

  5. Marcela Poffald closed this discussion on 11 Apr, 2018 03:59 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM