Skip to content

Commit

Permalink
HH-227240 support numpy types at json encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
1ou committed Aug 22, 2024
1 parent 456d2d7 commit a87d014
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontik/json_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def _encode_value(value: Any) -> Any:


def json_encode_bytes(obj: Any, default: Callable = _encode_value) -> bytes:
return orjson.dumps(obj, default=default, option=orjson.OPT_NON_STR_KEYS)
return orjson.dumps(obj, default=default, option=(orjson.OPT_NON_STR_KEYS | orjson.OPT_SERIALIZE_NUMPY))


def json_encode(obj: Any, default: Callable = _encode_value) -> str:
Expand Down

0 comments on commit a87d014

Please sign in to comment.