Added JSON event serialization.