本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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()));
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}