當前位置: 首頁>>代碼示例>>Java>>正文


Java JsonDeserialize類代碼示例

本文整理匯總了Java中org.codehaus.jackson.map.annotate.JsonDeserialize的典型用法代碼示例。如果您正苦於以下問題:Java JsonDeserialize類的具體用法?Java JsonDeserialize怎麽用?Java JsonDeserialize使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


JsonDeserialize類屬於org.codehaus.jackson.map.annotate包,在下文中一共展示了JsonDeserialize類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: findDeserializationContentType

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
public Class<?> findDeserializationContentType(Annotated paramAnnotated, JavaType paramJavaType, String paramString)
{
  JsonDeserialize localJsonDeserialize = (JsonDeserialize)paramAnnotated.getAnnotation(JsonDeserialize.class);
  Class localClass;
  if (localJsonDeserialize != null)
  {
    localClass = localJsonDeserialize.contentAs();
    if (localClass == NoClass.class);
  }
  do
  {
    return localClass;
    JsonContentClass localJsonContentClass = (JsonContentClass)paramAnnotated.getAnnotation(JsonContentClass.class);
    if (localJsonContentClass == null)
      break;
    localClass = localJsonContentClass.value();
  }
  while (localClass != NoClass.class);
  return null;
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:21,代碼來源:JacksonAnnotationIntrospector.java

示例2: findDeserializationKeyType

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
public Class<?> findDeserializationKeyType(Annotated paramAnnotated, JavaType paramJavaType, String paramString)
{
  JsonDeserialize localJsonDeserialize = (JsonDeserialize)paramAnnotated.getAnnotation(JsonDeserialize.class);
  Class localClass;
  if (localJsonDeserialize != null)
  {
    localClass = localJsonDeserialize.keyAs();
    if (localClass == NoClass.class);
  }
  do
  {
    return localClass;
    JsonKeyClass localJsonKeyClass = (JsonKeyClass)paramAnnotated.getAnnotation(JsonKeyClass.class);
    if (localJsonKeyClass == null)
      break;
    localClass = localJsonKeyClass.value();
  }
  while (localClass != NoClass.class);
  return null;
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:21,代碼來源:JacksonAnnotationIntrospector.java

示例3: findDeserializationType

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
public Class<?> findDeserializationType(Annotated paramAnnotated, JavaType paramJavaType, String paramString)
{
  JsonDeserialize localJsonDeserialize = (JsonDeserialize)paramAnnotated.getAnnotation(JsonDeserialize.class);
  Class localClass;
  if (localJsonDeserialize != null)
  {
    localClass = localJsonDeserialize.as();
    if (localClass == NoClass.class);
  }
  do
  {
    return localClass;
    JsonClass localJsonClass = (JsonClass)paramAnnotated.getAnnotation(JsonClass.class);
    if (localJsonClass == null)
      break;
    localClass = localJsonClass.value();
  }
  while (localClass != NoClass.class);
  return null;
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:21,代碼來源:JacksonAnnotationIntrospector.java

示例4: propertyField

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
@Override
public void propertyField(JFieldVar field, JDefinedClass clazz, String propertyName, JsonNode propertyNode) {
    field.annotate(JsonProperty.class).param("value", propertyName);
    if (field.type().erasure().equals(field.type().owner().ref(Set.class))) {
        field.annotate(JsonDeserialize.class).param("as", LinkedHashSet.class);
    }

    if (propertyNode.has("javaJsonView")) {
        field.annotate(JsonView.class).param(
                "value", field.type().owner().ref(propertyNode.get("javaJsonView").asText()));
    }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:13,代碼來源:Jackson1Annotator.java

示例5: findContentDeserializer

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
public Class<? extends JsonDeserializer<?>> findContentDeserializer(Annotated paramAnnotated)
{
  JsonDeserialize localJsonDeserialize = (JsonDeserialize)paramAnnotated.getAnnotation(JsonDeserialize.class);
  if (localJsonDeserialize != null)
  {
    Class localClass = localJsonDeserialize.contentUsing();
    if (localClass != JsonDeserializer.None.class)
      return localClass;
  }
  return null;
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:12,代碼來源:JacksonAnnotationIntrospector.java

示例6: findDeserializablePropertyName

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
public String findDeserializablePropertyName(AnnotatedField paramAnnotatedField)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedField.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  if ((paramAnnotatedField.hasAnnotation(JsonDeserialize.class)) || (paramAnnotatedField.hasAnnotation(JsonView.class)))
    return "";
  return null;
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:10,代碼來源:JacksonAnnotationIntrospector.java

示例7: findDeserializer

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
public Class<? extends JsonDeserializer<?>> findDeserializer(Annotated paramAnnotated, BeanProperty paramBeanProperty)
{
  JsonDeserialize localJsonDeserialize = (JsonDeserialize)paramAnnotated.getAnnotation(JsonDeserialize.class);
  if (localJsonDeserialize != null)
  {
    Class localClass = localJsonDeserialize.using();
    if (localClass != JsonDeserializer.None.class)
      return localClass;
  }
  return null;
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:12,代碼來源:JacksonAnnotationIntrospector.java

示例8: findKeyDeserializer

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
public Class<? extends KeyDeserializer> findKeyDeserializer(Annotated paramAnnotated)
{
  JsonDeserialize localJsonDeserialize = (JsonDeserialize)paramAnnotated.getAnnotation(JsonDeserialize.class);
  if (localJsonDeserialize != null)
  {
    Class localClass = localJsonDeserialize.keyUsing();
    if (localClass != KeyDeserializer.None.class)
      return localClass;
  }
  return null;
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:12,代碼來源:JacksonAnnotationIntrospector.java

示例9: findSettablePropertyName

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
public String findSettablePropertyName(AnnotatedMethod paramAnnotatedMethod)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedMethod.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  JsonSetter localJsonSetter = (JsonSetter)paramAnnotatedMethod.getAnnotation(JsonSetter.class);
  if (localJsonSetter != null)
    return localJsonSetter.value();
  if ((paramAnnotatedMethod.hasAnnotation(JsonDeserialize.class)) || (paramAnnotatedMethod.hasAnnotation(JsonView.class)))
    return "";
  return null;
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:13,代碼來源:JacksonAnnotationIntrospector.java

示例10: setExpiresAt

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
@JsonDeserialize(using = JsonDateDeserializer.class)
public void setExpiresAt(Date expiresAt) {
	if (expiresAt == null) {
		Calendar thirtyMinFromNow = Calendar.getInstance();
		thirtyMinFromNow.add(Calendar.MINUTE, 30);
		expiresAt = thirtyMinFromNow.getTime();
	}
	this.expiresAt = expiresAt;
}
 
開發者ID:jungyang,項目名稱:oauth-client-master,代碼行數:10,代碼來源:Approval.java

示例11: setBirthdate

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
@JsonProperty("birthdate")
@JsonDeserialize(using=SignupFormDeserializers.BirthdateDeserializer.class)
protected void setBirthdate(List<Integer> birthdateFields) {
	this.month = birthdateFields.get(0);
	this.day = birthdateFields.get(1);
	this.year = birthdateFields.get(2);
}
 
開發者ID:mqprichard,項目名稱:spring-greenhouse-clickstart,代碼行數:8,代碼來源:SignupForm.java

示例12: getExtensions

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
/**
 * A map of extension records, holding all verbatim extension terms.
 */
@NotNull
@JsonSerialize(keyUsing = ExtensionSerializer.class, contentUsing = TermMapListSerializer.class)
@JsonDeserialize(keyUsing = ExtensionKeyDeserializer.class, contentUsing = TermMapListDeserializer.class)
public Map<Extension, List<Map<Term, String>>> getExtensions() {
  return extensions;
}
 
開發者ID:gbif,項目名稱:gbif-api,代碼行數:10,代碼來源:VerbatimNameUsage.java

示例13: getExtensions

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
/**
 * A map holding all verbatim extension terms.
 */
@NotNull
@JsonSerialize(keyUsing = ExtensionSerializer.class, contentUsing = TermMapListSerializer.class)
@JsonDeserialize(keyUsing = ExtensionKeyDeserializer.class, contentUsing = TermMapListDeserializer.class)
public Map<Extension, List<Map<Term, String>>> getExtensions() {
  return extensions;
}
 
開發者ID:gbif,項目名稱:gbif-api,代碼行數:10,代碼來源:VerbatimOccurrence.java

示例14: findDeserializablePropertyName

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
public String findDeserializablePropertyName(AnnotatedField paramAnnotatedField)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedField.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  if ((paramAnnotatedField.hasAnnotation(JsonDeserialize.class)) || (paramAnnotatedField.hasAnnotation(JsonView.class)) || (paramAnnotatedField.hasAnnotation(JsonBackReference.class)) || (paramAnnotatedField.hasAnnotation(JsonManagedReference.class)))
    return "";
  return null;
}
 
開發者ID:isnuryusuf,項目名稱:ingress-indonesia-dev,代碼行數:10,代碼來源:JacksonAnnotationIntrospector.java

示例15: findDeserializationContentType

import org.codehaus.jackson.map.annotate.JsonDeserialize; //導入依賴的package包/類
public Class<?> findDeserializationContentType(Annotated paramAnnotated, JavaType paramJavaType, String paramString)
{
  JsonDeserialize localJsonDeserialize = (JsonDeserialize)paramAnnotated.getAnnotation(JsonDeserialize.class);
  if (localJsonDeserialize != null)
  {
    Class localClass = localJsonDeserialize.contentAs();
    if (localClass != NoClass.class)
      return localClass;
  }
  return null;
}
 
開發者ID:isnuryusuf,項目名稱:ingress-indonesia-dev,代碼行數:12,代碼來源:JacksonAnnotationIntrospector.java


注:本文中的org.codehaus.jackson.map.annotate.JsonDeserialize類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。