Skip to content

Feature Request: extract JSON pointer from SingleIssue #84

Closed

Description

@piever

Currently, the result of validate is a SingleIssue with a "julian" path representation, such as for example [foo][1][bar], stored in issue.path.

I would like to extract the JSON pointer in its standardized format, that is to say #/foo/0/bar in this case. It is difficult to get there for 2 reasons:

  1. One needs to figure out whether to convert [a][1] to #/a/0 (if 1 was an integer index of an array) or #/a/1 (if 1 was the string "1" as an object key).
  2. Things get messy if I have a "a]" key or something like that in my JSON object.

My suggestion would be to store the path as a path::Vector{Union{Int, String}} and only build the string when displaying the issue. From the path it would be straightforward to generate a JSON pointer. Ideally, there could be a public method to get a json_pointer(issue::SingleIssue).

Activity

  1. piever commented on Oct 7, 2026

    @piever
    Author

    Thank you so much, I've tested locally and this does fix my usecase and I can remove some pretty ugly workarounds! If all the changes for version 1.6 are in, I imagine this can be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions