fixes backend part of #9 and #10
split type adapters into serializers and deserializers (like in OCPP websocket module)