serialize dict to a JSON formated string.
This commit is contained in:
parent
d983c452de
commit
837f035bc1
@ -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))
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user