Package org.apache.wink.providers.jackson.internal.pojo.polymorphic

Examples of org.apache.wink.providers.jackson.internal.pojo.polymorphic.Animal


                new JSONObject(response.getContentAsString())));
       
        // call the provider as though the wink-client was in use on the client side
        InputStream is = new ByteArrayInputStream(response.getContentAsByteArray());
        JacksonJsonProvider jacksonProvider = new JacksonJsonProvider();
        Animal animal = (Animal)jacksonProvider.readFrom(Object.class, Animal.class, null, MediaType.APPLICATION_JSON_TYPE, null, is);
       
        // make sure pseudo polymorphism support works.  See Animal class with @JsonCreator and @JsonProperty annotations
        assertEquals(Dog.class, animal.getClass());

    }
View Full Code Here


    public static class AnimalResource {

        @GET
        @Produces("application/json")
        public Animal getDog() throws IOException {
            Animal animal = new Dog();
            return animal;
        }
View Full Code Here

                new JSONObject(response.getContentAsString())));
       
        // call the provider as though the wink-client was in use on the client side
        InputStream is = new ByteArrayInputStream(response.getContentAsByteArray());
        JacksonJsonProvider jacksonProvider = new JacksonJsonProvider();
        Animal animal = (Animal)jacksonProvider.readFrom(Object.class, Animal.class, null, MediaType.APPLICATION_JSON_TYPE, null, is);
       
        // make sure pseudo polymorphism support works.  See Animal class with @JsonCreator and @JsonProperty annotations
        assertEquals(Dog.class, animal.getClass());

    }
View Full Code Here

    public static class AnimalResource {

        @GET
        @Produces("application/json")
        public Animal getDog() throws IOException {
            Animal animal = new Dog();
            return animal;
        }
View Full Code Here

TOP

Related Classes of org.apache.wink.providers.jackson.internal.pojo.polymorphic.Animal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.