Comments (5)
@gavinwahl the percent encoding comes from section 6 of the JSON Pointer RFC 6901. So while it's technically not part of the JSON Schema suite of specifications, it's something that would be easy to get wrong if you're doing your own URI encoding of JSON Pointers.
Does that address your concerns about the validity of the test?
from json-schema-test-suite.
"A JSON Pointer can be represented in a URI fragment identifier by encoding it into octets using UTF-8 [RFC3629], while percent-encoding those characters not allowed by the fragment rule in [RFC3986]."
Are refs JSON Pointers, or JSON Pointers encoded as URI fragment identifiers? I don't think the linked section can apply, because refs are not encoded into octets. (There's no way to represent octets in JSON, only unicode code points)
from json-schema-test-suite.
@gavinwahl percent-encoded octets are being used here the same way as they are throughout URIs as described in RFC3986. The value of a "$ref"
is a URI reference. There is nothing special about it. It's encoded into UTF-8 (or UTF-16 or UTF-32) like any other string data for JSON. URI-encoded JSON Pointers are one type of fragment supported by application/schema+json
. So the pointer gets encoded into a URI fragment per RFCs 6901 and 3986, and the resulting URI is represented in JSON the same way any URI would be.
from json-schema-test-suite.
close?
from json-schema-test-suite.
Yeah, no reply for two months.
from json-schema-test-suite.
Related Issues (20)
- Incorrect Revert "by default, "format" only annotates, not validates"? HOT 5
- Negative schema tests HOT 4
- File URIs with pointer fragments HOT 6
- New release? HOT 4
- Perhaps add test for `"type": []` HOT 3
- Suite contains invalid, positive tests for idn-hostname HOT 2
- Add tests for single label IDN hostnames
- Missing test for `unevaluatedProperties` and `$dynamicRef` HOT 1
- Add an `id` property to all test cases HOT 4
- Add a `specification` property to test cases + tests HOT 12
- Should identifier declarations be respected in non-schema locations? HOT 29
- Clarify how test runners should handle `format`. HOT 1
- Unknown `format` handling HOT 2
- Test for jumping over a resource HOT 16
- Syntax highlight schemas + instances in the terminal HOT 1
- Description and test case contradiction: `unevaluatedProperties` HOT 3
- update the test suite for draft-next HOT 6
- Make CI annotate pull requests with links to the {section} specified in "specification" HOT 11
- Tests for mixed Arabic-Indic digits and Extended Arabic-Indic digits violates the Bidi rule HOT 10
- Clarification Needed on Handling Duplicate `anchor` Definitions Across JSON Schema Tests HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-schema-test-suite.