Closed databus23 closed 11 years ago
Sorry it took me so long to get to this one :-/ I think I'll forward-port this to the unified
branch. Not sure I can think of anything more elegant for get.lua
at the moment, but it seems reasonable enough for the moment.
On second thought, I figure we can just have data
returned as the string JSON blob, and then clients decode it. It results in a little more string escaping, but ultimately, I think it's cleaner.
If it's alright with you, since the unified
branch has diverged so much, it'll be easier to just amend this new commit to point to you as the author?
Sure, happy this is considered.
If the job data JSON contains empty arrays they are mangled by the decoding to a lua table. This commit stores and returns the raw job data without processing it with lua/cjson.
This pull request belongs to seomoz/qless#73 and tries to be a fix for it.
The change to
get.lua
qualifies as a hack and I would be happy for alternative suggestions.The way I see it there are only two options:
cjson.encode
to create the JSON response and squeeze in the raw job_data afterwards (my current approach).