jsonnet-libs
jsonnet-libs copied to clipboard
std.native('manifestYamlFromJson') may no longer be required
Consider this diff:
diff --git a/ksonnet-util/util.libsonnet b/ksonnet-util/util.libsonnet
index a151e8a..683eafc 100644
--- a/ksonnet-util/util.libsonnet
+++ b/ksonnet-util/util.libsonnet
@@ -225,8 +225,7 @@ local util(k) = {
]),
manifestYaml(value):: (
- local f = std.native('manifestYamlFromJson');
- f(std.toString(value))
+ std.manifestYamlDoc(value)
),
resourcesRequests(cpu, memory)::
I'm trying to avoid using tanka just for this function. Note that there are some formatting differences - the generated yaml using the built-in likes to quote all key names:
https://github.com/google/jsonnet/issues/821
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.