Add DjbletsJSONEncoder for lazy string and datetime serialization.

Review Request #5473 — Created Feb. 15, 2014 and submitted

Information

Djblets
master
9ee14d6...

Reviewers

We had two places where datetimes were serialized to chop off the
extra precision. Turns out we needed a third, for json_dumps. These
other places also didn't know how to handle lazy strings, which only
json_dumps knew how to do.

There's now a DjbletsJSONEncoder that can take on these
responsibilities. BasicAPIEncoder, ResourceAPIEncoder, and json_dumps
now make use of this instead of DjangoJSONEncoder.

RB and Djblets unit tests pass.

Verified that the timestamps from json_dumps no longer had the
extra precision that was causing unwanted message bubbles in RB.

david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed