comparison src/luan/lib/PickleCon.java @ 147:cc3a0578edac

fix Io.reverse_pickle git-svn-id: https://luan-java.googlecode.com/svn/trunk@148 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Sun, 15 Jun 2014 15:41:36 +0000
parents 0517a4a7fcc5
children f99fd64291b3
comparison
equal deleted inserted replaced
146:0517a4a7fcc5 147:cc3a0578edac
68 } 68 }
69 69
70 public String pickle(Object obj) throws LuanException { 70 public String pickle(Object obj) throws LuanException {
71 if( obj == null ) 71 if( obj == null )
72 return "nil"; 72 return "nil";
73 if( obj instanceof Boolean )
74 return Luan.toString((Boolean)obj);
73 if( obj instanceof Number ) 75 if( obj instanceof Number )
74 return Luan.toString((Number)obj); 76 return Luan.toString((Number)obj);
75 if( obj instanceof String ) 77 if( obj instanceof String )
76 return "\"" + Luan.stringEncode((String)obj) + "\""; 78 return "\"" + Luan.stringEncode((String)obj) + "\"";
77 if( obj instanceof LuanTable ) 79 if( obj instanceof LuanTable )