public static JsonDeserializer<?> forType(Class<?> rawType) { // Start with more common types... if (rawType == Integer.TYPE) { return IntDeser.instance; } if (rawType == Long.TYPE) { return LongDeser.instance; } if (rawType == Byte.TYPE) { return new ByteDeser(); } if (rawType == Short.TYPE) { return new ShortDeser(); } if (rawType == Float.TYPE) { return new FloatDeser(); } if (rawType == Double.TYPE) { return new DoubleDeser(); } if (rawType == Boolean.TYPE) { return new BooleanDeser(); } if (rawType == Character.TYPE) { return new CharDeser(); } throw new IllegalStateException(); }
public static JsonDeserializer<?> forType(Class<?> rawType) { // Start with more common types... if (rawType == Integer.TYPE) { return IntDeser.instance; } if (rawType == Long.TYPE) { return LongDeser.instance; } if (rawType == Byte.TYPE) { return new ByteDeser(); } if (rawType == Short.TYPE) { return new ShortDeser(); } if (rawType == Float.TYPE) { return new FloatDeser(); } if (rawType == Double.TYPE) { return new DoubleDeser(); } if (rawType == Boolean.TYPE) { return new BooleanDeser(); } if (rawType == Character.TYPE) { return new CharDeser(); } throw new IllegalStateException(); }
public static JsonDeserializer<?> forType(Class<?> rawType) { // Start with more common types... if (rawType == Integer.TYPE) { return IntDeser.instance; } if (rawType == Long.TYPE) { return LongDeser.instance; } if (rawType == Byte.TYPE) { return new ByteDeser(); } if (rawType == Short.TYPE) { return new ShortDeser(); } if (rawType == Float.TYPE) { return new FloatDeser(); } if (rawType == Double.TYPE) { return new DoubleDeser(); } if (rawType == Boolean.TYPE) { return new BooleanDeser(); } if (rawType == Character.TYPE) { return new CharDeser(); } throw new IllegalStateException(); }
public static JsonDeserializer<?> forType(Class<?> rawType) { // Start with more common types... if (rawType == Integer.TYPE) { return IntDeser.instance; } if (rawType == Long.TYPE) { return LongDeser.instance; } if (rawType == Byte.TYPE) { return new ByteDeser(); } if (rawType == Short.TYPE) { return new ShortDeser(); } if (rawType == Float.TYPE) { return new FloatDeser(); } if (rawType == Double.TYPE) { return new DoubleDeser(); } if (rawType == Boolean.TYPE) { return new BooleanDeser(); } if (rawType == Character.TYPE) { return new CharDeser(); } throw new IllegalStateException(); }
public static JsonDeserializer<?> forType(Class<?> rawType) { // Start with more common types... if (rawType == Integer.TYPE) { return IntDeser.instance; } if (rawType == Long.TYPE) { return LongDeser.instance; } if (rawType == Byte.TYPE) { return new ByteDeser(); } if (rawType == Short.TYPE) { return new ShortDeser(); } if (rawType == Float.TYPE) { return new FloatDeser(); } if (rawType == Double.TYPE) { return new DoubleDeser(); } if (rawType == Boolean.TYPE) { return new BooleanDeser(); } if (rawType == Character.TYPE) { return new CharDeser(); } throw new IllegalStateException(); }
protected PrimitiveArrayDeserializers() { _allDeserializers = new HashMap<JavaType,JsonDeserializer<Object>>(); // note: we'll use component type as key, not array type add(boolean.class, new BooleanDeser()); /* ByteDeser is bit special, as it has 2 separate modes of operation; * one for String input (-> base64 input), the other for * numeric input */ add(byte.class, new ByteDeser()); add(short.class, new ShortDeser()); add(int.class, new IntDeser()); add(long.class, new LongDeser()); add(float.class, new FloatDeser()); add(double.class, new DoubleDeser()); add(String.class, new StringDeser()); /* also: char[] is most likely only used with Strings; doesn't * seem to make sense to transfer as numbers */ add(char.class, new CharDeser()); }
protected PrimitiveArrayDeserializers() { _allDeserializers = new HashMap<JavaType,JsonDeserializer<Object>>(); // note: we'll use component type as key, not array type add(boolean.class, new BooleanDeser()); /* ByteDeser is bit special, as it has 2 separate modes of operation; * one for String input (-> base64 input), the other for * numeric input */ add(byte.class, new ByteDeser()); add(short.class, new ShortDeser()); add(int.class, new IntDeser()); add(long.class, new LongDeser()); add(float.class, new FloatDeser()); add(double.class, new DoubleDeser()); add(String.class, new StringDeser()); /* also: char[] is most likely only used with Strings; doesn't * seem to make sense to transfer as numbers */ add(char.class, new CharDeser()); }
@Override protected PrimitiveArrayDeserializers<?> withResolved(Boolean unwrapSingle) { return new ByteDeser(this, unwrapSingle); }
@Override protected PrimitiveArrayDeserializers<?> withResolved(NullValueProvider nuller, Boolean unwrapSingle) { return new ByteDeser(this, nuller, unwrapSingle); }
@Override protected PrimitiveArrayDeserializers<?> withResolved(NullValueProvider nuller, Boolean unwrapSingle) { return new ByteDeser(this, nuller, unwrapSingle); }