Skip to content

Commit

Permalink
perf: Remove the default ujson to improve compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
amisadmin committed Jan 11, 2024
1 parent ef4118b commit fad6dd7
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions fastapi_amis_admin/admin/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from fastapi import FastAPI
from fastapi.exceptions import RequestValidationError, ValidationException
from fastapi.responses import JSONResponse
from fastapi.utils import is_body_allowed_for_status_code
from pydantic import ValidationError
from starlette.background import BackgroundTask
Expand All @@ -18,13 +19,6 @@
from fastapi_amis_admin.crud import BaseApiOut
from fastapi_amis_admin.utils.translation import i18n as _

try:
import ujson
from fastapi.responses import UJSONResponse as JSONResponse
except ImportError:
ujson = None
from fastapi.responses import JSONResponse


def register_exception_handlers(app: FastAPI, **kwargs):
"""global exception catch"""
Expand Down

0 comments on commit fad6dd7

Please sign in to comment.