Closed
Description
I noticed the formatter lives within the CloudEvent object.
CloudEvent {
spec:
Spec1 {
payload:
{ specversion: '1.0',
id: '1234',
time: '2020-05-28T20:46:18.970Z',
source: '/some/source',
type: 'example',
datacontenttype: undefined,
data: undefined,
subject: undefined } },
formatter: JSONFormatter {},
extensions: [] }
This doesn't really make sense since we can have 1000 CloudEvent objects with the same formatter.
Maybe it should be a static class/set of methods.