Skip to content

Support JSON Pointer syntax #269

Open
@jbohanon

Description

@jbohanon

JSON Pointer syntax support was removed in v3.0. I haven't found any issues or PRs referencing why this option was removed. Was it to simplify the code during the AST rewrite? Our use-case for Inja is in application networking (specifically envoy), where it is quite likely that . will appear in JSON keys such as in this simple example:

{
  "domains": {
    "prod.example.com": "up",
    "dev.example.com": "down"
  }
}

where prior to v3.0, we could have used something like {% if domains/prod.example.com == "up" %}prod is up!!{% endif %}. This is a simplified, contrived example, and while workarounds may be possible on a case-by-case basis, this is not practical for user-supplied templates.

This has blocked us upgrading the dependency thus far, but we are now looking to support more recent features (e.g. set). Can this support be added back?

Activity

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions