Skip to content

Commit

Permalink
FIX: Teach json how to serialize the schema
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Sep 25, 2022
1 parent cc1b1c3 commit bf448b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/schemacode/bidsschematools/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import yaml

from . import __bids_version__, __version__, utils
from .types import Namespace
from .types.namespace import Namespace, NamespaceEncoder

lgr = utils.get_logger()
# Basic settings for output, for now just basic
Expand Down Expand Up @@ -144,7 +144,7 @@ def export_schema(schema):
schema_dict = schema.to_dict()
schema_dict["schema_version"] = __version__
schema_dict["bids_version"] = __bids_version__
return json.dumps(schema_dict)
return json.dumps(schema_dict, cls=NamespaceEncoder)


def filter_schema(schema, **kwargs):
Expand Down

0 comments on commit bf448b5

Please sign in to comment.