Skip to content

Commit b513d1c

Browse files
committed
Removed jsonsubschema JSONDecoder; never used, and not going to use it
1 parent 60f0b94 commit b513d1c

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

jsonsubschema/__init__.py

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
joinSchemas = api.join
1515
isEquivalent = api.isEquivalent
1616

17-
subschemaDecoder = api.JSONSubSchemaFactory
18-
1917
canonicalizeSchema = _canonicalization.canonicalize_schema
2018

2119
set_debug = config.set_debug

jsonsubschema/api.py

+1-14
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@author: Andrew Habib
44
'''
55

6-
import json
6+
77
import jsonref
88

99
from jsonsubschema._canonicalization import (
@@ -16,19 +16,6 @@
1616
)
1717

1818

19-
class JSONSubSchemaFactory(json.JSONDecoder):
20-
''' A json decoder which embeds subtype checking into the json object.
21-
This is experimental at the moment. '''
22-
23-
def __init__(self, *args, **kwargs):
24-
json.JSONDecoder.__init__(
25-
self, object_hook=self.object_hook, *args, **kwargs)
26-
27-
def object_hook(self, d):
28-
return simplify_schema_and_embed_checkers(
29-
canonicalize_schema(d))
30-
31-
3219
def prepare_operands(s1, s2):
3320
# First, we reload schemas using jsonref to resolve $ref
3421
# before starting canonicalization.

0 commit comments

Comments
 (0)