You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
802 B

#![cfg_attr(debug_assertions, allow(unused_imports))]
#![allow(dead_code)]
mod ext; use ext::*;
// Internal modules
pub mod object;
pub mod formats;
pub use formats::FormatKind;
// TODO: External modules/functions/types/whatever
// TODO: FFI module, export C interface
#[cfg(test)]
mod tests {
use super::object::Object;
#[test]
fn from_json_to_lisp() {
let value_js: Object = serde_json::json!({
"number": 200.10,
"boolean": true,
"null_value": null,
"map": {
"array": ["string", false, null, 100.0, []],
"empty": {}
}
}).into();
eprintln!("Value (Object): {}", value_js);
println!("JSON: {}", serde_json::to_string(&value_js).expect("ser json"));
println!("LISP: {}", serde_lexpr::to_string(&value_js).expect("ser lisp"));
}
}