Package org.codehaus.jackson.map.annotate

Examples of org.codehaus.jackson.map.annotate.JsonView


    public void testViews() throws Exception
    {
        JacksonJsonProvider prov = new JacksonJsonProvider();
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        Bean bean = new Bean();
        Annotation ann = new JsonView() {
            @Override
            public Class<?>[] value() { return new Class[] { MyView1.class }; }

            @Override
            public Class<? extends Annotation> annotationType() {
View Full Code Here


         * so we would need to change it a bit.
         * Let's not bother, then, since this works well for now.
         */
        for (Annotation annotation : annotations) {
            if (annotation.annotationType().isAssignableFrom(JsonView.class)) {
                JsonView jsonView = (JsonView) annotation;
                Class<?>[] views = jsonView.value();
                if (views.length > 1) {
                    StringBuilder s = new StringBuilder("Multiple @JsonView's can not be used on a JAX-RS method. Got ");
                    s.append(views.length).append(" views: ");
                    for (int i = 0; i < views.length; i++) {
                        if (i > 0) {
View Full Code Here

TOP

Related Classes of org.codehaus.jackson.map.annotate.JsonView

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.