Skip to content

Commit

Permalink
fix json parse
Browse files Browse the repository at this point in the history
  • Loading branch information
judepayne committed Jun 1, 2024
1 parent 8e38971 commit 16c0d2e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.8.2
- fix to json parse

# 0.8.1
- Better prettified json from parse in cmd line tool

Expand Down
7 changes: 3 additions & 4 deletions cmd/dictim.clj
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@
:alias :p}
:k {:coerce :boolean
:desc "Convert keys to keywords when parsing d2 to dictim syntax edn"}
:json {:coerce :boolean
:alias :j
:desc "Converts the output of parse to dictim syntax json"}
:j {:coerce :boolean
:desc "Converts the output of parse to dictim syntax json"}
:b {:coerce :boolean
:desc "Additional to -j: prettifies the json output of parse"}
:watch {:desc watch-help
Expand Down Expand Up @@ -218,7 +217,7 @@
dict (if (:k opts)
(p/dictim d2 :key-fn keyword)
(p/dictim d2))]
(if (:json opts)
(if (:j opts)
(println (json/to-json dict {:pretty (:b opts)}))
(clojure.pprint/pprint dict))))

Expand Down
2 changes: 1 addition & 1 deletion resources/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.1
0.8.2

0 comments on commit 16c0d2e

Please sign in to comment.