inja icon indicating copy to clipboard operation
inja copied to clipboard

Support JSON Pointer syntax

Open jbohanon opened this issue 1 year ago • 0 comments

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?

jbohanon avatar Jun 14 '23 19:06 jbohanon