This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;5-minute sketch of tagged literals in JSON via the little known second argument to the browser's JSON.parse. | |
;;It's no EDN, but it's still a hell of a lot nicer than the usual JSON-deserialization state of affairs. | |
(ns shim.json | |
(:require [goog.date.DateTime :as DateTime])) | |
(defn parse-tagged-string | |
"Parse a tagged string within JSON. | |
Assumes string begins with a throwaway first character and there is a single space between the tag and its data." |