Convert existing JSON to Pkl #110
Replies: 3 comments
-
This would be an excellent feature. Dhall provides |
Beta Was this translation helpful? Give feedback.
-
There exist a json-schema to Pkl converter.
Its not json to Pkl, but at least something... 🤷 |
Beta Was this translation helpful? Give feedback.
-
At the moment, converting JSON to Pkl requires writing a one-off converter. For an example of a converter, take a look at k8s.contrib.convert. Generally, a converter will parse JSON into Pkl, and then use the Pcf renderer as a poor man's Pkl renderer, with some extra logic to add imports, or amends headers. This is something that we want to improve, though. It should be possible to provide a generic command for this. |
Beta Was this translation helpful? Give feedback.
-
I have lots of existing configs for projects, some are pretty long so I would love a quick way to convert from JSON to Pkl.
Beta Was this translation helpful? Give feedback.
All reactions