@Test public void shouldMapArrayToStringArrayWhenSpecified() { Assert.assertEquals(new ArrayNode<TextNode>().add(TextNode.valueOf("41")).add(TextNode.valueOf("42")), this.mapper.map(new int[] { 41, 42 }, null, new TypeToken<IArrayNode<TextNode>>() { }.getType())); }
public IJsonNode map(final Object value) { if (value == null) return NullNode.getInstance(); final Type type = this.getDefaultMappingType(value.getClass()); if (type == null) throw new IllegalArgumentException("Cannot find appropriate json type for " + value); return this.map(value, null, type); }
JavaToJsonMapper extends AbstractTypeMapper<TypeMapper<?, ?>> { public IJsonNode map(final Object value) { if (value == null) return NullNode.getInstance(); final Type type = this.getDefaultMappingType(value.getClass()); if (type == null) throw new IllegalArgumentException("Cannot find appropriate json type for " + value); return this.map(value, null, type); } }
JavaToJsonMapper extends AbstractTypeMapper<TypeMapper<?, ?>> { public IJsonNode map(final Object value) { if (value == null) return NullNode.getInstance(); final Type type = this.getDefaultMappingType(value.getClass()); if (type == null) throw new IllegalArgumentException("Cannot find appropriate json type for " + value); return this.map(value, null, type); } protected  JavaToJsonMapper(); }
JavaToJsonMapper extends AbstractTypeMapper<TypeMapper<?, ?>> { public IJsonNode map(final Object value) { if (value == null) return NullNode.getInstance(); final Type type = this.getDefaultMappingType(value.getClass()); if (type == null) throw new IllegalArgumentException("Cannot find appropriate json type for " + value); return this.map(value, null, type); } protected  JavaToJsonMapper(); @SuppressWarnings("unchecked") TypeMapper<F, T> getMapper(final Class<?> fromClass, final Class<T> targetType); IJsonNode map(final Object value); @SuppressWarnings("unchecked") T map(final Object from, final T to, final Type targetType); }
JavaToJsonMapper extends AbstractTypeMapper<TypeMapper<?, ?>> { public IJsonNode map(final Object value) { if (value == null) return NullNode.getInstance(); final Type type = this.getDefaultMappingType(value.getClass()); if (type == null) throw new IllegalArgumentException("Cannot find appropriate json type for " + value); return this.map(value, null, type); } protected  JavaToJsonMapper(); @SuppressWarnings("unchecked") TypeMapper<F, T> getMapper(final Class<?> fromClass, final Class<T> targetType); IJsonNode map(final Object value); @SuppressWarnings("unchecked") T map(final Object from, final T to, final Type targetType); static final JavaToJsonMapper INSTANCE; }