klein icon indicating copy to clipboard operation
klein copied to clipboard

asynchronous JSON serialization for klein.Plating

Open glyph opened this issue 9 years ago • 2 comments

You can put a Deferred into a template so you kinda need to be able to put one into the JSON.

here's the implementation, basically: https://gist.github.com/glyph/f1e7dc3143e35ff78d29395021d24f72

glyph avatar Aug 02 '16 04:08 glyph

Just a note that the implementation does not handle the errback case correctly: if any of the deferreds error out, the returned deferred will never fire (instead of firing with the error, which is probably the expected behavior). I didn't see this explicitly called out, so I wanted to make sure we don't just plop this into klein without fixing that first.

moshez avatar Sep 20 '16 20:09 moshez

@moshez - I knew that it wasn't quite ready for prime time yet, but I don't know that I'd picked up on that specific nuance of brokenness. Thanks for pointing it out!

glyph avatar Sep 20 '16 22:09 glyph