@Test public void shouldNestedMapObject() { final ObjectNode input = new ObjectNode(); input.put("a", IntNode.valueOf(1)); input.put("b", TextNode.valueOf("test")); final ObjectNode nestedObjectNode = new ObjectNode(); nestedObjectNode.put("1", TextNode.valueOf("x")); nestedObjectNode.put("2", BooleanNode.valueOf(true)); input.put("nestedObject", nestedObjectNode); final Map<String, Object> expected = new HashMap<String, Object>(); expected.put("a", 1); expected.put("b", "test"); final Map<String, Object> nested = new HashMap<String, Object>(); nested.put("1", "x"); nested.put("2", true); expected.put("nestedObject", nested); Assert.assertEquals(expected, this.mapper.map(input, null, Map.class)); Assert.assertEquals(expected, this.mapper.map(input)); }
public <T> T map(final IJsonNode from) { return this.map(from, null, this.getDefaultMappingType(from.getClass())); }
JsonToJavaMapper extends AbstractTypeMapper<TypeMapper<?, ?>> { public <T> T map(final IJsonNode from) { return this.map(from, null, this.getDefaultMappingType(from.getClass())); } }
JsonToJavaMapper extends AbstractTypeMapper<TypeMapper<?, ?>> { public <T> T map(final IJsonNode from) { return this.map(from, null, this.getDefaultMappingType(from.getClass())); } protected  JsonToJavaMapper(); }
JsonToJavaMapper extends AbstractTypeMapper<TypeMapper<?, ?>> { public <T> T map(final IJsonNode from) { return this.map(from, null, this.getDefaultMappingType(from.getClass())); } protected  JsonToJavaMapper(); @SuppressWarnings("unchecked") TypeMapper<F, T> getMapper(final Class<F> fromClass, final Class<T> targetType); T map(final IJsonNode from); T map(final IJsonNode from, final T to); T map(final IJsonNode from, final T to, final Class<T> targetType); T map(final IJsonNode from, T to, final Type targetType); }
JsonToJavaMapper extends AbstractTypeMapper<TypeMapper<?, ?>> { public <T> T map(final IJsonNode from) { return this.map(from, null, this.getDefaultMappingType(from.getClass())); } protected  JsonToJavaMapper(); @SuppressWarnings("unchecked") TypeMapper<F, T> getMapper(final Class<F> fromClass, final Class<T> targetType); T map(final IJsonNode from); T map(final IJsonNode from, final T to); T map(final IJsonNode from, final T to, final Class<T> targetType); T map(final IJsonNode from, T to, final Type targetType); static final JsonToJavaMapper INSTANCE; }