InputJsonParser: Add encodeEvent API for symmetry Add an API to be able to encode events in the parser's format, which will remove the need for us to hand-write the JSON files in tests. Bug: 310997010 Test: Presubmit Flag: TEST_ONLY Change-Id: Iccb3b94f49c6453931d1a895d91ef032519d7dc2