Based on some discussion in [this pull request](https://github.com/cloudevents/sdk-javascript/pull/87#issuecomment-621412733) there are some improvements that could be made to the [`Cloudevent.format()` function](https://github.com/cloudevents/sdk-javascript/blob/master/lib/cloudevent.js#L20-L29). * Consider optimizing so that JSON.parse doesn't require several levels of indirection to get to. * Expose a way to retrieve the data in multiple formats * Consider moving the sanity checks into the `spec` instance and not in `Cloudevent` itself.
Activity