Browse Source

db interface: pretty print json path

Bernadette Elena Hammerle 4 năm trước cách đây
mục cha
commit
5f017eaa50
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/database/databaseInterface.py

+ 1 - 1
src/database/databaseInterface.py

@@ -24,7 +24,7 @@ def set_path():
         pathDict = json.load(pathFile)
     pathDict[path.get("name")] = path.get("coords")
     with open(filePath, "w") as pathFile:
-        json.dump(pathDict, pathFile)
+        json.dump(pathDict, pathFile, indent=2)
     return "ok", 200