Skip to content
crnixon edited this page Sep 11, 2012 · 2 revisions

Conversion Table

element edn ruby
nil nil nil
boolean true false true false
character \c "c"
string "some string" "some string"
keyword :keyword-homie :"keyword-homie"
symbol symbol EDN::Type::Symbol.new("symbol") (subclass of String)
integer 666 666
floating point -6.66 -6.66
list (1 2 3) EDN::Type::List.new([1, 2, 3]) (subclass of Array)
vector [1 2 3] [1, 2, 3]
map {:a 1 :b 2} {:a => 1, :b => 2}
set #{1 2 3} Set.new([1 2 3])
tagged element #app/unknown-tag ["hello"] EDN::Type::Unknown.new("app/unknown-tag", ["hello"]) (responds to tag and value)
#inst tagged element #inst "2012-09-04 10:00:00" DateTime.parse("2012-09-04 10:00:00")
#uuid tagged element #uuid "550e8400-e29b-41d4-a716-446655440000" EDN::Type::UUID.new("550e8400-e29b-41d4-a716-446655440000")
Clone this wiki locally