mirror of
https://github.com/langgenius/dify.git
synced 2025-11-16 03:13:19 +00:00
12 lines
216 B
Python
12 lines
216 B
Python
from typing import Any, Optional
|
|
|
|
import orjson
|
|
|
|
|
|
def orjson_dumps(
|
|
obj: Any,
|
|
encoding: str = "utf-8",
|
|
option: Optional[int] = None,
|
|
) -> str:
|
|
return orjson.dumps(obj, option=option).decode(encoding)
|