node-wot icon indicating copy to clipboard operation
node-wot copied to clipboard

Create dedicated packages for codecs

Open danielpeintner opened this issue 2 years ago • 2 comments

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

danielpeintner avatar Apr 26 '23 06:04 danielpeintner

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?

egekorkan avatar Apr 26 '23 17:04 egekorkan

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"));

danielpeintner avatar Apr 27 '23 05:04 danielpeintner