Logo
Explore Help
Register Sign In
kexsh/dify
1
0
Fork 0
You've already forked dify
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
6453fc49735ed2e94de310d6a637fb29ca70aaac
dify/api/libs/orjson.py

12 lines
203 B
Python
Raw Normal View History

chore: add ast-grep rule to convert Optional[T] to T | None (#25560) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-15 13:06:33 +08:00
from typing import Any
chore: use orjson in streaming event JSON serialisation for performance improvement (#24763)
2025-08-29 14:06:07 +08:00
import orjson
def orjson_dumps(
obj: Any,
encoding: str = "utf-8",
chore: add ast-grep rule to convert Optional[T] to T | None (#25560) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-15 13:06:33 +08:00
option: int | None = None,
chore: use orjson in streaming event JSON serialisation for performance improvement (#24763)
2025-08-29 14:06:07 +08:00
) -> str:
return orjson.dumps(obj, option=option).decode(encoding)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.5 Page: 1580ms Template: 125ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API