got it to read json file and parse it

main
Matthew Huntington 3 years ago
parent 29899ad3b1
commit 22ef9dd38e

16
Cargo.lock generated

@ -0,0 +1,16 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "json"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "078e285eafdfb6c4b434e0d31e8cfcb5115b651496faca5749b88fafd4f23bfd"
[[package]]
name = "trello-to-markdown"
version = "0.1.0"
dependencies = [
"json",
]

@ -0,0 +1,9 @@
[package]
name = "trello-to-markdown"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
json = "0.12.4"

@ -1,3 +0,0 @@
fn main(){
println!("Hello World!");
}

@ -0,0 +1,8 @@
use std::fs;
fn main(){
let data = fs::read_to_string("boards/coding.json").expect("unable to read file");
let parsed = json::parse(&data.to_string()).unwrap();
println!("{}", parsed["id"]);
}

@ -0,0 +1 @@
{"rustc_fingerprint":4061912311098465116,"outputs":{"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/matthuntington/.rustup/toolchains/stable-aarch64-apple-darwin\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"aes\"\ntarget_feature=\"crc\"\ntarget_feature=\"dit\"\ntarget_feature=\"dotprod\"\ntarget_feature=\"dpb\"\ntarget_feature=\"dpb2\"\ntarget_feature=\"fcma\"\ntarget_feature=\"fhm\"\ntarget_feature=\"flagm\"\ntarget_feature=\"fp16\"\ntarget_feature=\"frintts\"\ntarget_feature=\"jsconv\"\ntarget_feature=\"lor\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"paca\"\ntarget_feature=\"pacg\"\ntarget_feature=\"pan\"\ntarget_feature=\"pmuv3\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rcpc2\"\ntarget_feature=\"rdm\"\ntarget_feature=\"sb\"\ntarget_feature=\"sha2\"\ntarget_feature=\"sha3\"\ntarget_feature=\"ssbs\"\ntarget_feature=\"vh\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.68.2 (9eb3afe9e 2023-03-27)\nbinary: rustc\ncommit-hash: 9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0\ncommit-date: 2023-03-27\nhost: aarch64-apple-darwin\nrelease: 1.68.2\nLLVM version: 15.0.6\n","stderr":""}},"successes":{}}

@ -0,0 +1,3 @@
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by cargo.
# For information about cache directory tags see https://bford.info/cachedir/

@ -0,0 +1 @@
This file has an mtime of when this was started.

@ -0,0 +1 @@
{"rustc":5075174800980901198,"features":"[]","target":6017992490481343375,"profile":8344124108420085910,"path":14397890706175317328,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/json-c8b920a2a7c68887/dep-lib-json"}}],"rustflags":[],"metadata":6678033801590456021,"config":2202906307356721367,"compile_kind":0}

@ -0,0 +1 @@
{"rustc":5075174800980901198,"features":"[]","target":13336727341023039991,"profile":11736316127369858332,"path":1684066648322511884,"deps":[[15022001623851364653,"json",false,10768436554609517170]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/trello-to-markdown-8a1eaa75c6298065/dep-bin-trello-to-markdown"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}

@ -0,0 +1,19 @@
/Users/matthuntington/Documents/git/trello-to-markdown/target/debug/deps/json-c8b920a2a7c68887.rmeta: /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/lib.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/codegen.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/parser.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/value/mod.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/value/implements.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/error.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/mod.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/diyfp.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/grisu2.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/print_dec.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/short.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/object.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/number.rs
/Users/matthuntington/Documents/git/trello-to-markdown/target/debug/deps/libjson-c8b920a2a7c68887.rlib: /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/lib.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/codegen.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/parser.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/value/mod.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/value/implements.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/error.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/mod.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/diyfp.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/grisu2.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/print_dec.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/short.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/object.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/number.rs
/Users/matthuntington/Documents/git/trello-to-markdown/target/debug/deps/json-c8b920a2a7c68887.d: /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/lib.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/codegen.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/parser.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/value/mod.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/value/implements.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/error.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/mod.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/diyfp.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/grisu2.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/print_dec.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/short.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/object.rs /Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/number.rs
/Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/lib.rs:
/Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/codegen.rs:
/Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/parser.rs:
/Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/value/mod.rs:
/Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/value/implements.rs:
/Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/error.rs:
/Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/mod.rs:
/Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/diyfp.rs:
/Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/grisu2.rs:
/Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/util/print_dec.rs:
/Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/short.rs:
/Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/object.rs:
/Users/matthuntington/.cargo/registry/src/github.com-1ecc6299db9ec823/json-0.12.4/src/number.rs:

@ -0,0 +1,5 @@
/Users/matthuntington/Documents/git/trello-to-markdown/target/debug/deps/trello_to_markdown-8a1eaa75c6298065: src/main.rs
/Users/matthuntington/Documents/git/trello-to-markdown/target/debug/deps/trello_to_markdown-8a1eaa75c6298065.d: src/main.rs
src/main.rs:

Binary file not shown.

@ -0,0 +1 @@
/Users/matthuntington/Documents/git/trello-to-markdown/target/debug/trello-to-markdown: /Users/matthuntington/Documents/git/trello-to-markdown/src/main.rs
Loading…
Cancel
Save