not-fl3 / nanoserde

Serialisation library with zero dependencies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Empty map serialize panics

aboodman opened this issue · comments

let m = HashMap::new();
println!(m.serialize_json());

panics here due to assumption that map is always at least len > 0:

https://github.com/not-fl3/nanoserde/blob/master/src/serde_json.rs#L976