posted an update

Developers, start your linters. @nealrs kindly pointed out to me that the Unofficial ChallengePost API wasn't actually returning valid JSON, and was instead returning a string full of escaped JSON, which wasn't very useful. I guess that's what I get for staring at JSON responses in a terminal and thinking that they look close enough to JSON for me, instead of trying to actually parse the responses. Either way, I've updated both endpoints to return valid JSON, at least, valid according to JSONLint.

What does this mean if you've already integrated with this API? Absolutely nothing, unless you wrote some sort of hackish work-around to make up for the malformed JSON this was returning. In that case, you can just rip all that out and work with real JSON now.

In case anyone is wondering, the issue was caused by me returning JSON.stringify(object) from the lambda function. Apparently Lambda is smart enough to stringify whatever you pass it, so you should just pass an actual javascript object to the success function.

Log in or sign up for Devpost to join the conversation.