Skip to content

Formatter should be static #195

Closed
@grant

Description

@grant

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions