mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
api: Don't use ujson library unecessarily.
ujson is very fast, but doesn't provide good error messages for parsing errors.
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
from typing import Dict, Any, Optional, Iterable
|
||||
from io import StringIO
|
||||
|
||||
import os
|
||||
import json
|
||||
import ujson
|
||||
import os
|
||||
|
||||
from zerver.lib import mdiff
|
||||
|
||||
@@ -16,7 +15,7 @@ FIXTURE_PATH = os.path.join(ZULIP_DIR, 'templates', 'zerver', 'api', 'fixtures.j
|
||||
def load_api_fixtures():
|
||||
# type: () -> Dict[str, Any]
|
||||
with open(FIXTURE_PATH, 'r') as fp:
|
||||
json_dict = ujson.loads(fp.read())
|
||||
json_dict = json.loads(fp.read())
|
||||
return json_dict
|
||||
|
||||
FIXTURES = load_api_fixtures()
|
||||
|
||||
Reference in New Issue
Block a user