json_mlake ยท API

json.ijson

Functions

check_ijson

def check_ijson(text: String, value: Value)

Whether text and its parse satisfy the checkable I-JSON rules.

Args
text: The document as it arrived, needed for the surrogate rule because parsing does not preserve the distinction.
value: The same document parsed, needed for the uniqueness rule because that one is about structure.

Raises Error: On the first violation, naming the rule and the place.

check_no_unpaired_surrogates

def check_no_unpaired_surrogates(text: String)

RFC 7493 section 2.3: no unpaired surrogate in any string.

check_unique_member_names

def check_unique_member_names(value: Value)

RFC 7493 section 2.1: no object names a member twice.