aboutsummaryrefslogtreecommitdiff
path: root/src/object/mod.rs
blob: efc15445e9ccfe4f2e786eb62690c05a3c0535b4 (plain)
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
use serde::Serialize;
use std::collections::BTreeMap;

pub mod helper;
pub mod parser;
pub mod read;

#[derive(Debug, Clone, Serialize)]
pub enum Value {
    Bool(bool),
    U8(u8),
    I8(i8),
    U16(u16),
    I16(i16),
    U32(u32),
    I32(i32),
    F32(f32),
    U64(u64),
    I64(i64),
    F64(f64),
    Array(Vec<Value>),
    Object {
        class: String,
        fields: BTreeMap<String, Value>,
    },
    Typeless(Vec<u8>),
    String(String),
}