eclipse-thingweb / eclipse-thingweb/node-wot
Allow different Codecs for the same contentType
Open
enhancement
- Dominant language
- TypeScript
- Stars
- 192
- Forks
- 100
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 6
Description
At the moment, it is possible to "register" **one** `Codec` per `contentType` via `ContentSerdes`.
e.g., `ContentSerdes.get().addCodec(new MyCodec("application/myType"))`
There are situations where this is not enough. For example, one might want to register a generic codec for `application/octet-stream` and yet another for the _same_ `application/octet-stream` which is used for binding-opcua only.
We should extend the API in a way to allow for that use-case.
Contributor guide
Assessment
This issue has not been assessed yet.