Logo
Explore Help
Register Sign In
admin/dify
1
0
Fork 0
You've already forked dify
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
96a0b9991e274c8e61fa2f2aaf46b7df3eb52906
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.25.2 Page: 429ms Template: 2ms
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