• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use serde_json::Value;
2 
main()3 fn main() {
4     let mut data = String::from(
5         r#"
6      {
7          "name": /* full */ "John Doe",
8          "age": 43,
9          "phones": [
10              "+44 1234567", // work phone
11              "+44 2345678", // home phone
12          ] /** comment **/
13      }"#,
14     );
15 
16     json_strip_comments::strip(&mut data).unwrap();
17     let value: Value = serde_json::from_str(&data).unwrap();
18 
19     println!("{value}");
20 }
21