From 28bfd3a7ba4e20601546dbc57a29f4e5b2e3ee0e Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sun, 27 Jan 2019 03:56:51 +0400 Subject: Sun, 27 Jan 2019 03:56:51 +0400 Signed-off-by: Valentin Popov --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 5b35f4a..6774ec7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,6 +5,9 @@ use std::path::Path; extern crate clap; use clap::{load_yaml, App}; +extern crate rustc_serialize; +use rustc_serialize::json; + mod parser; use parser::*; @@ -18,6 +21,7 @@ fn main() { true => { let file: File = File::open(path).unwrap(); let data: ParserResult = parse(BufReader::new(file)); + println!("{}", json::as_pretty_json(&data)); } _ => panic!("Error File!"), }; -- cgit v1.2.3