voxmedia / autotune

Platform for reusable news tools
BSD 3-Clause "New" or "Revised" License
414 stars 33 forks source link

JSON serialization error when passed from client side to server side #304

Closed caseymm closed 8 years ago

caseymm commented 8 years ago

What should be an array of objects becomes a dictionary with keys starting at 0 and going up when data is passed from the client side to the before_build function on the server side.

Basically, this:

"moments": [ { "moment": "moment 1j", "text": "text text text" }, { "moment": "moment 2", "text": "asfasdfasdfsdf asdf ssss" }, { "moment": "moment 3!", "text": "This is moment 3!" } ]

has become

"moments": { "0": { "moment": "moment 1jnkk", "text": "text text text" }, "1": { "moment": "moment 2", "text": "asfasdfasdfsdf asdf ssss" }, "2": { "moment": "moment 3!", "text": "This is moment 3!" } }