node-wot
node-wot copied to clipboard
Create dedicated packages for codecs
At the moment all codecs are in package core.
I suggest we separate codecs in dedicated packages like codec-cbor.
However, I think the most "important" codecs should remain in core (json, plain-text).
see discussions in https://github.com/eclipse/thingweb.node-wot/issues/953
Moving one part of the discussion here. I think that the impact on the user is very important and maintenance should come second.
This is not true. What you need to do is the following (extending/resetting the codecs from core) ContentSerdes.get().addCodec(new CodecImplementedInPackageBla("application/bla"));
In this case, why do we even add codecs to the core package but not simply add them to a default servient, like we do with protocol bindings?
I am not sure if I get your comment.
I think we should add some "default" codecs by default. Others can be added as required and also added to other contentTypes as the default ones.
ContentSerdes.get().addCodec(new JsonCodec("application/my-json"));