databricks / sjsonnet

Apache License 2.0
267 stars 55 forks source link

Safe select operator #124

Closed jam01 closed 1 year ago

jam01 commented 3 years ago

It would be useful to have a selector notation that was null safe. Perhaps ?. as Kotlin has https://kotlinlang.org/docs/null-safety.html#safe-calls

{x: 1}?.y

would return null instead of throwing an error

Edit: realized that this is something that would have to be added to jsonnet first. I've opened the same item on that project.

lihaoyi-databricks commented 1 year ago

Gonna close this for now; we can re-open it when it's implemented upstream