From 7254d96492f330f522355c1b7b4178e64de9ee26 Mon Sep 17 00:00:00 2001
From: swittl <simon.wittl@th-deg.de>
Date: Wed, 20 Nov 2024 11:18:22 +0100
Subject: [PATCH] add load json

---
 src/thd_json/load_json.py | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 src/thd_json/load_json.py

diff --git a/src/thd_json/load_json.py b/src/thd_json/load_json.py
new file mode 100644
index 0000000..3bdf52b
--- /dev/null
+++ b/src/thd_json/load_json.py
@@ -0,0 +1,9 @@
+import json
+from pathlib import Path
+
+
+def load_thd_projection(json_path: Path):
+    if not json_path.suffix.endswith("json"):
+        raise ValueError("Wrong data type. Input must be `.json`file.")
+    meta_data = json.load(json_path.open())
+    return meta_data
\ No newline at end of file
-- 
GitLab