Plumb context through for serialization.

Change-Id: I2a49f57aa7576604deeac898a7cceb36ae68d66f
30 files changed