ex0dus-0x / microkv

Minimal and persistent key-value store designed with security in mind
MIT License
32 stars 6 forks source link

Add serialize trait to get value #11

Closed fewensa closed 3 years ago

fewensa commented 3 years ago

Sometimes the value is not necessarily fixed and similar. After adding serialize, you can use serde to serialize it to what you want. like there

https://github.com/darwinia-network/bridger/blob/d87e725a3c0c1d145f9a99104f47964050498ddb/bin/src/route/kv.rs#L43

The server query from microkv, and response data to client, maybe any types, so there can be serialize to serde_json::Value, need add Serialize to there.

This pull request is include https://github.com/ex0dus-0x/microkv/pull/10, I think the namespace is important. so please consider merging first #10

fewensa commented 3 years ago

It makes no sense