pub trait JsonCodec<T> {
// Provided methods
fn encode_json(&self) -> Map<String, Value> { ... }
fn decode_json(_obj: &Map<String, Value>) -> BuckyResult<T> { ... }
fn encode_string(&self) -> String { ... }
fn decode_string(value: &str) -> BuckyResult<T> { ... }
fn decode_value(value: &Value) -> BuckyResult<T> { ... }
fn encode_value(&self) -> Value { ... }
}