Permalink
Browse files

adds marshalling for OtpErlangStrings

  • Loading branch information...
videlalvaro committed Aug 14, 2010
1 parent 3ddcbaa commit 7015f72fe6f06063490689063338e32179645b1e
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/closerl/core.clj
View
@@ -17,6 +17,7 @@
OtpErlangLong
OtpErlangFloat
OtpErlangDouble
+ OtpErlangString
OtpErlangList
OtpErlangTuple)))
@@ -121,6 +122,7 @@
(.bigIntegerValue o)))
(defmethod otp-value OtpErlangFloat [o] (float (.floatValue o)))
(defmethod otp-value OtpErlangDouble [o] (float (.floatValue o)))
+(defmethod otp-value OtpErlangString [o] (str (.stringValue o)))
(defmethod otp-value OtpErlangList [o] (with-meta (map otp-value (.elements o)) {:otp-type "List"}))
(defmethod otp-value OtpErlangTuple [o] (with-meta (map otp-value (.elements o)) {:otp-type "Tuple"}))
(defmethod otp-value nil [o] "")

0 comments on commit 7015f72

Please sign in to comment.