Skip to content

Instantly share code, notes, and snippets.

@benzap
Created August 4, 2018 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benzap/fb4e977de36ff8fe2f6530d67af44dfc to your computer and use it in GitHub Desktop.
Save benzap/fb4e977de36ff8fe2f6530d67af44dfc to your computer and use it in GitHub Desktop.
EDN Linter Example Use Case
(ns edn-linter
;; require name of edn linter
(:require [the-name :refer [parse-with-info]]
(def input-string "[:a :b
{:test 123}]")
(def parsed-edn (parse-with-info input-string))
;; {:line 0
;; :type :vector
;; :children
;; [{:line 0 :index 0 :type :keyword :value :a}
;; {:line 0 :index 1 :type :keyword :value :b}
;; {:line 1 :index 2 :type :map
;; :children [{:line 1 :index :test :type mapentry :value {:type :integer :value 123}}]}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment