Skip to content

Commit

Permalink
Fix SafeJsonEncoder to handle non-ASCII characters by default
Browse files Browse the repository at this point in the history
  • Loading branch information
arash77 committed Nov 8, 2024
1 parent a38bf57 commit 5d510ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/galaxy/model/custom_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@


class SafeJsonEncoder(json.JSONEncoder):
def __init__(self, *args, **kwargs):
kwargs["ensure_ascii"] = False
super().__init__(*args, **kwargs)

def default(self, obj):
if isinstance(obj, numpy.int_):
return int(obj)
Expand Down

0 comments on commit 5d510ee

Please sign in to comment.