feat: add serde and initial structs for deserialisation
This commit is contained in:
parent
d4c5758ed6
commit
4f5612df47
4 changed files with 24 additions and 0 deletions
|
|
@ -4,3 +4,5 @@ version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
serde = { version = "1.0.210", features = ["derive"] }
|
||||||
|
serde_json = "1.0"
|
||||||
|
|
|
||||||
1
src/lib.rs
Normal file
1
src/lib.rs
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
mod utils;
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
mod parse;
|
||||||
20
src/utils/parse.rs
Normal file
20
src/utils/parse.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Serialize, Deserialize)]
|
||||||
|
pub struct Testcases {
|
||||||
|
testcase: Vec<Testcase>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize, Deserialize)]
|
||||||
|
pub struct Testcase {
|
||||||
|
uuid: String,
|
||||||
|
action: String,
|
||||||
|
arguments: Vec<Argument>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize, Deserialize)]
|
||||||
|
pub struct Argument {
|
||||||
|
uuid: String,
|
||||||
|
action: String,
|
||||||
|
arguments: Vec<Argument>,
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue