Fixed JSON export.
This commit is contained in:
parent
774e5fc987
commit
0a9debfd3f
@ -26,6 +26,7 @@ extern crate rand;
|
||||
|
||||
use structopt::StructOpt;
|
||||
use serde::{Serialize,Deserialize};
|
||||
use serde_json::json;
|
||||
|
||||
// define the commandline parameters
|
||||
#[derive(StructOpt)]
|
||||
@ -130,7 +131,9 @@ fn main()
|
||||
else
|
||||
{
|
||||
// export data to JSON format
|
||||
let out_json = serde_json::to_string(&prisoners).unwrap();
|
||||
let out_json = json!({
|
||||
"prisoners": prisoners
|
||||
});
|
||||
println!("{}", out_json);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user