1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
pub mod schema {

    use serde::{Deserialize, Serialize};

    #[derive(Debug, Serialize, Deserialize)]
    #[serde(rename_all = "camelCase")]
    pub struct JsonResume {
        basics: Basics,
        work: Vec<Work>,
        education: Vec<Education>,
        skills: Vec<Skill>,
        projects: Vec<Project>,
    }

    #[derive(Debug, Serialize, Deserialize)]
    #[serde(rename_all = "camelCase")]
    struct Basics {
        name: Option<String>,
        label: Option<String>,
        image: Option<String>,
        email: Option<String>,
        phone: Option<String>,
        url: Option<String>,
        summary: Option<String>,
        location: Location,
    }

    #[derive(Debug, Serialize, Deserialize)]
    #[serde(rename_all = "camelCase")]
    struct Location {
        address: Option<String>,
        postal_code: Option<String>,
        city: Option<String>,
        country_code: Option<String>,
        region: Option<String>,
    }

    #[derive(Debug, Serialize, Deserialize)]
    #[serde(rename_all = "camelCase")]
    struct Work {
        name: Option<String>,
        position: Option<String>,
        start_date: Option<String>,
        end_date: Option<String>,
        summary: Option<String>,
        highlights: Vec<String>,
    }

    #[derive(Debug, Serialize, Deserialize)]
    #[serde(rename_all = "camelCase")]
    struct Education {
        institution: Option<String>,
        url: Option<String>,
        area: Option<String>,
        study_type: Option<String>,
        start_date: Option<String>,
        end_date: Option<String>,
        score: Option<String>,
    }

    #[derive(Debug, Serialize, Deserialize)]
    #[serde(rename_all = "camelCase")]
    struct Skill {
        name: Option<String>,
        keywords: Vec<String>,
    }

    #[derive(Debug, Serialize, Deserialize)]
    #[serde(rename_all = "camelCase")]
    struct Project {
        name: Option<String>,
        description: Option<String>,
        entity: Option<String>,
    }
}