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.

38 lines
764 B

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