Skip to content

Request<T> and Response<T> for faster serialization #212

Open
@faern

Description

@faern

The current Request and Response objects ultimately hold on to serde_json::Value for their actual values. This forces a user of those objects to first serialize/deserialize their types T to/from a serde_json::Value between the wire representation and the final T representation. I have not done any performance benchmarks, but I guess serializing twice does cost quite a lot of extra resources.

If these types had a generic it would be possible to have them deserialize directly from a wire format to their target type T. There would of course be some obstacles to overcome to make this work, but I think it could work. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions