Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification on Claim Path #7

Open
babisRoutis opened this issue Apr 9, 2024 · 0 comments
Open

Clarification on Claim Path #7

babisRoutis opened this issue Apr 9, 2024 · 0 comments

Comments

@babisRoutis
Copy link

babisRoutis commented Apr 9, 2024

I find paragraph 8.1 about Claim Path and especially the part that explains the processing of the path components confusing.
What is not clear to me is the difference between a string path component pointing to a JSON array claim and the same pointer with a null at the end.

Using the example of paragraph

{
  "name": "Arthur Dent",
  "address": {
    "street_address": "42 Market Street",
    "city": "Milliways",
    "postal_code": "12345"
  },
  "degrees": [
    {
      "type": "Bachelor of Science",
      "university": "University of Betelgeuse"
    },
    {
      "type": "Master of Science",
      "university": "University of Betelgeuse"
    }
  ],
  "nationalities": ["British", "Betelgeusian"]
}

I would like to ask if the two paths bellow will produce the same results:

  • ["degrees", null]
  • ["degrees"]

To my understanding,

  • The first (["degrees", null]) will return a set of two objects (each one representing a degree)
  • The 2nd (["degrees"]) will return a set containing a Json Array (with the two degrees)

Is this the expected outcome or both paths should return just a set of two degrees?

Furthermore, I have the impression that a path should always begin with a string simply because it has to be applied in the top-level json object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant