src/main/java/com/jrjackson/RubyObjectDeserializer.java in jrjackson-0.2.2 vs src/main/java/com/jrjackson/RubyObjectDeserializer.java in jrjackson-0.2.3
- old
+ new
@@ -24,12 +24,10 @@
private final static RubyObject[] NO_OBJECTS = new RubyObject[0];
protected final static Ruby __ruby__ = Ruby.getGlobalRuntime();
- private static final HashMap<String, RubyKeyConverter> converters = new HashMap<String, RubyKeyConverter>(3);
-
private RubyKeyConverter converter;
public RubyObjectDeserializer() {
super(RubyObject.class);
}
@@ -72,11 +70,12 @@
case VALUE_EMBEDDED_OBJECT:
return RubyUtils.rubyObject(__ruby__, jp.getEmbeddedObject());
case VALUE_STRING:
- return RubyUtils.rubyString(__ruby__, jp.getText().getBytes());
+ // return RubyUtils.rubyString(__ruby__, jp.getText().getBytes("UTF-8"));
+ return RubyUtils.rubyString(__ruby__, jp.getText());
case VALUE_NUMBER_INT:
/* [JACKSON-100]: caller may want to get all integral values
* returned as BigInteger, for consistency
*/
@@ -88,10 +87,9 @@
case VALUE_NUMBER_FLOAT:
if (ctxt.isEnabled(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS)) {
return RubyUtils.rubyBigDecimal(__ruby__, jp.getDecimalValue());
}
return RubyUtils.rubyFloat(__ruby__, jp.getDoubleValue());
- // return RubyUtils.rubyFloat(__ruby__, jp.getText());
case VALUE_TRUE:
return __ruby__.newBoolean(Boolean.TRUE);
case VALUE_FALSE: