Skip to content

Can serde deserialize an arbitrary json structure into a recursive enum/tree? #144

Closed
@lilith

Description

@lilith

For example,

https://github.com/rust-lang-nursery/rustc-serialize/blob/master/src/json.rs#L261-L270

pub enum Json {
    I64(i64),
    U64(u64),
    F64(f64),
    String(string::String),
    Boolean(bool),
    Array(self::Array),
    Object(self::Object),
    Null,
}
pub type Array = Vec<Json>;
pub type Object = BTreeMap<string::String, Json>;

I'd like to mix validated and free-form JSON in the same string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions