summaryrefslogtreecommitdiff
path: root/cantree/test
diff options
context:
space:
mode:
Diffstat (limited to 'cantree/test')
-rw-r--r--cantree/test/example.json1
-rw-r--r--cantree/test/t.go17
2 files changed, 18 insertions, 0 deletions
diff --git a/cantree/test/example.json b/cantree/test/example.json
new file mode 100644
index 0000000..9fb056c
--- /dev/null
+++ b/cantree/test/example.json
@@ -0,0 +1 @@
+{"id":17428885,"name":"my files","full_name":"my files","context_id":9064950,"context_type":"User","parent_folder_id":null,"created_at":"2023-08-18T04:06:27Z","updated_at":"2023-08-18T04:06:27Z","lock_at":null,"unlock_at":null,"position":null,"locked":false,"folders_url":"https://sdccd.instructure.com/api/v1/folders/17428885/folders","files_url":"https://sdccd.instructure.com/api/v1/folders/17428885/files","files_count":15,"folders_count":10,"hidden":null,"locked_for_user":false,"hidden_for_user":false,"for_submissions":false,"can_upload":true}
diff --git a/cantree/test/t.go b/cantree/test/t.go
new file mode 100644
index 0000000..203d6b9
--- /dev/null
+++ b/cantree/test/t.go
@@ -0,0 +1,17 @@
+package main
+
+import (
+ "fmt"
+ "encoding/json"
+ "io"
+ "os"
+)
+
+func main() {
+ in, _ := os.Open("example.json")
+ contents, _ := io.ReadAll(in)
+
+ var m map[string]interface{}
+ json.Unmarshal(contents, &m)
+ fmt.Printf("%v\n", m)
+} \ No newline at end of file