From 9440ce488165b2ae64d563b997d2b49d38b49d13 Mon Sep 17 00:00:00 2001 From: Nima Date: Fri, 1 Dec 2023 21:09:03 +0100 Subject: [PATCH] fix: json loads {} in string --- partialjson/__init__.py | 2 +- partialjson/json_parser.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/partialjson/__init__.py b/partialjson/__init__.py index e1d568f..5d1ef86 100644 --- a/partialjson/__init__.py +++ b/partialjson/__init__.py @@ -5,7 +5,7 @@ """ from .json_parser import JSONParser -__version__ = "0.0.4" +__version__ = "0.0.5" __author__ = 'Nima Akbarzadeh' __author_email__ = "iw4p@protonmail.com" __license__ = "MIT" diff --git a/partialjson/json_parser.py b/partialjson/json_parser.py index 65b9c45..c5e2710 100644 --- a/partialjson/json_parser.py +++ b/partialjson/json_parser.py @@ -35,7 +35,7 @@ def parse(self, s): self.on_extra_token(s, data, reminding) return json.loads(json.dumps(data)) else: - return json.loads({}) + return json.loads("{}") def parse_any(self, s, e): if not s: