@@ -82,24 +82,34 @@ registered category and prefixed with `x-`. For example,
8282
8383## Examples
8484
85- {{<schema ` Schema with 'contentMediaType' and 'contentEncoding' keyword ` >}}
85+ {{<schema ` A schema that describes JSON data encoded using Base 64 ` >}}
8686{
8787 "$schema": "https://json-schema.org/draft/2020-12/schema ",
8888 "contentEncoding": "base64",
8989 "contentMediaType": "application/json"
9090}
9191{{</schema >}}
9292
93- {{<instance-pass ` An instance with a properly stringified JSON document encoded in base64 is valid` >}}
94- "eyAibmFtZSI6ICJKb2huIERvZSIgfQ==" // --> { "name": "John Doe" }
93+ {{<instance-pass ` A string value that represents a valid JSON document encoded in Base 64 is valid and an annotations are emitted ` >}}
94+ "eyAibmFtZSI6ICJKb2huIERvZSIgfQ==" // { "name": "John Doe" }
9595{{</instance-pass >}}
9696
97- {{<instance-pass ` An encoded value that represents invalid JSON data is still valid ` >}}
98- "eyAibmFtZSI6IH0=" // --> { "name": }
97+ {{<instance-annotation >}}
98+ { "keyword": "/contentEncoding", "instance": "", "value": "base64" }
99+ { "keyword": "/contentMediaType", "instance": "", "value": "application/json" }
100+ {{</instance-annotation >}}
101+
102+ {{<instance-pass ` A string value that represents an invalid JSON document encoded in Base 64 is valid and an annotations are emitted ` >}}
103+ "eyAibmFtZSI6IH0=" // { "name": }
99104{{</instance-pass >}}
100105
101- {{<instance-pass ` A non-string instance is ignored ` >}}
102- true
106+ {{<instance-annotation >}}
107+ { "keyword": "/contentEncoding", "instance": "", "value": "base64" }
108+ { "keyword": "/contentMediaType", "instance": "", "value": "application/json" }
109+ {{</instance-annotation >}}
110+
111+ {{<instance-pass ` A non-string value is valid but (perhaps counter-intuitively) annotations are still emitted ` >}}
112+ 1234
103113{{</instance-pass >}}
104114
105115{{<instance-annotation >}}
0 commit comments