JSON to YAML converter

This commit is contained in:
Rune Juhl (Atea) 2022-10-25 20:37:00 +02:00
commit 00111d6ff0
2 changed files with 11 additions and 0 deletions

1
bb.edn Normal file
View file

@ -0,0 +1 @@
{}

10
jaml.clj Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bb
(ns yaml
(:require [cheshire.core :as json]
[clj-yaml.core :as yaml]
[clojure.java.io]))
(print (yaml/generate-string
(json/parse-stream (clojure.java.io/reader
(first *command-line-args*)))
:dumper-options {:flow-style :block}))