diff --git a/mdrsclient/commands/file_metadata.py b/mdrsclient/commands/file_metadata.py index bef099c..d419fd8 100644 --- a/mdrsclient/commands/file_metadata.py +++ b/mdrsclient/commands/file_metadata.py @@ -1,3 +1,4 @@ +import json import os from argparse import Namespace, _SubParsersAction @@ -28,4 +29,4 @@ class FileMetadataCommand(BaseCommand): raise IllegalArgumentException(f"File `{r_basename}` not found.") file_api = FileApi(connection) metadata = file_api.metadata(file) - print(metadata) + print(json.dumps(metadata)) diff --git a/mdrsclient/commands/metadata.py b/mdrsclient/commands/metadata.py index c3fcdda..5d21512 100644 --- a/mdrsclient/commands/metadata.py +++ b/mdrsclient/commands/metadata.py @@ -1,3 +1,4 @@ +import json from argparse import Namespace, _SubParsersAction from mdrsclient.api import FolderApi @@ -20,4 +21,4 @@ class MetadataCommand(BaseCommand): folder = self._find_folder(connection, laboratory, r_path, args.password) folder_api = FolderApi(connection) metadata = folder_api.metadata(folder.id) - print(metadata) + print(json.dumps(metadata))