File tree 2 files changed +1
-16
lines changed
2 files changed +1
-16
lines changed Original file line number Diff line number Diff line change 14
14
joinSchemas = api .join
15
15
isEquivalent = api .isEquivalent
16
16
17
- subschemaDecoder = api .JSONSubSchemaFactory
18
-
19
17
canonicalizeSchema = _canonicalization .canonicalize_schema
20
18
21
19
set_debug = config .set_debug
Original file line number Diff line number Diff line change 3
3
@author: Andrew Habib
4
4
'''
5
5
6
- import json
6
+
7
7
import jsonref
8
8
9
9
from jsonsubschema ._canonicalization import (
16
16
)
17
17
18
18
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
-
32
19
def prepare_operands (s1 , s2 ):
33
20
# First, we reload schemas using jsonref to resolve $ref
34
21
# before starting canonicalization.
You can’t perform that action at this time.
0 commit comments