Skip to content

Instantly share code, notes, and snippets.

@arthuredelstein
Created December 5, 2010 01:26
Show Gist options
  • Save arthuredelstein/728668 to your computer and use it in GitHub Desktop.
Save arthuredelstein/728668 to your computer and use it in GitHub Desktop.
(defn data-object-to-map [obj]
(into {}
(for [f (.getFields (type obj))
:when (zero? (bit-and (.getModifiers f) Modifier/STATIC))]
[(.getName f) (.get f obj)])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment