Package org.codehaus.jackson.annotate

Examples of org.codehaus.jackson.annotate.JsonProperty


    Field[] paramMap = target.getClass().getDeclaredFields();
    for (Field field : paramMap) {
      String resultName = field.getName();
      String value = getFieldValue(field, target);
      if (value != null) {
        JsonProperty prop = field.getAnnotation(JsonProperty.class);
        if (prop != null) {
          resultMap.put(prop.value(), getFieldValue(field, target));
        } else {
          resultMap.put(resultName, getFieldValue(field, target));
        }
      }
    }
View Full Code Here


        for (int j = 0; j < as.length; j++) {
          Annotation a = as[j];
          //TODO handle http://docs.oracle.com/javase/6/docs/api/java/beans/ConstructorProperties.html
          //https://github.com/joshbeitelspacher/jackson-extensions/blob/master/src/main/java/com/netbeetle/jackson/ConstructorPropertiesAnnotationIntrospector.java
          if (JsonProperty.class.equals(a.annotationType())) {
            JsonProperty p = (JsonProperty) a;
            String value = p.value();
            final SqlParameterDefinition definition = parameterDef(config, k, value, parameterType, i);
            parameters.put(value, definition);
          }
        }
      }
View Full Code Here

        for (int j = 0; j < as.length; j++) {
          Annotation a = as[j];
          //TODO handle http://docs.oracle.com/javase/6/docs/api/java/beans/ConstructorProperties.html
          //https://github.com/joshbeitelspacher/jackson-extensions/blob/master/src/main/java/com/netbeetle/jackson/ConstructorPropertiesAnnotationIntrospector.java
          if (JsonProperty.class.equals(a.annotationType())) {
            JsonProperty p = (JsonProperty) a;
            String value = p.value();
            final SqlParameterDefinition definition = parameterDef(config, k, value, parameterType, i);
            parameters.put(value, definition);
          }
        }
      }
View Full Code Here

        for (int j = 0; j < as.length; j++) {
          Annotation a = as[j];
          //TODO handle http://docs.oracle.com/javase/6/docs/api/java/beans/ConstructorProperties.html
          //https://github.com/joshbeitelspacher/jackson-extensions/blob/master/src/main/java/com/netbeetle/jackson/ConstructorPropertiesAnnotationIntrospector.java
          if (JsonProperty.class.equals(a.annotationType())) {
            JsonProperty p = (JsonProperty) a;
            String value = p.value();
            final SqlParameterDefinition definition = parameterDef(config, k, value, parameterType, i);
            parameters.put(value, definition);
          }
        }
      }
View Full Code Here

        RiakKey key = null;
        RiakUsermeta usermeta = null;
        RiakLinks links = null;
        RiakIndex index = null;
        RiakVClock vclock = null;
    JsonProperty jacksonJsonProperty = null;

        AnnotatedMember member = beanPropertyWriter.getMember();
        if (member instanceof AnnotatedField) {
            AnnotatedElement element = member.getAnnotated();
            key = element.getAnnotation(RiakKey.class);
View Full Code Here

        if (p.getReadMethod().getAnnotation(JsonIgnore.class) != null)
          continue;

        String name = p.getName();
        JsonProperty altName = p.getReadMethod().getAnnotation(JsonProperty.class);
        if (altName != null && altName.value().length() > 0)
          name = altName.value();

        if (exclude != null && exclude.containsKey(name) && exclude.get(name))
          continue;

        properties.put(name, p);
View Full Code Here

TOP

Related Classes of org.codehaus.jackson.annotate.JsonProperty

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.