From a87d014627f8108be298d397342e1b1d2d71aa93 Mon Sep 17 00:00:00 2001 From: 1ou Date: Thu, 22 Aug 2024 12:44:36 +0300 Subject: [PATCH] HH-227240 support numpy types at json encoding --- frontik/json_builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontik/json_builder.py b/frontik/json_builder.py index 00d1349a9..41bd569b6 100644 --- a/frontik/json_builder.py +++ b/frontik/json_builder.py @@ -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: