Skip to content

Instantly share code, notes, and snippets.

@jsl
Last active December 12, 2015 02:29
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jsl/4699323 to your computer and use it in GitHub Desktop.
clj-yaml deserializes into arbitrary data types
;; Clojure library clj-yaml deserializes into arbitrary Java classes
user=> (require '[clj-yaml.core :as yaml])
nil
user=> (yaml/parse-string "!!java.io.File")
#<File >
@jsl
Copy link
Author

jsl commented Feb 2, 2013

The library defines encode and decode on Object which causes this behavior: https://github.com/lancepantz/clj-yaml/blob/master/src/clj_yaml/core.clj#L61.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment