Re-implement serialization (#201)
* Serialization tests now pass again * Tidy up and test more edge-cases * Use attributes rather than custom serializer for arrays * Add JSON Schema support * Tests for JSON Schema generation and validation * Add comments * Support custom predicates * Clippy fixes * Make deserialization/constructor functions pub(crate)
This commit is contained in:
parent
26a6b2d143
commit
bf6d8aee8b
17 changed files with 554 additions and 255 deletions
|
|
@ -43,15 +43,11 @@ pub struct MockSignedPod {
|
|||
kvs: HashMap<Key, Value>,
|
||||
}
|
||||
|
||||
// impl MockSignedPod {
|
||||
// pub fn deserialize(id: PodId, signature: String, dict: Dictionary) -> Self {
|
||||
// Self {
|
||||
// id,
|
||||
// signature,
|
||||
// dict,
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
impl MockSignedPod {
|
||||
pub(crate) fn new(id: PodId, signature: String, kvs: HashMap<Key, Value>) -> Self {
|
||||
Self { id, signature, kvs }
|
||||
}
|
||||
}
|
||||
|
||||
impl Pod for MockSignedPod {
|
||||
fn verify(&self) -> Result<()> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue