GSON必需的最低Java版本 [英] GSON Minimum Java version required

查看:432
本文介绍了GSON必需的最低Java版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用GSON API所需的Java / JDK的最低版本是多少?
和for gson-2.2.1.jar?

What is the minimum version of Java/JDK required to use GSON API? And for gson-2.2.1.jar ?

推荐答案

Gson严重使用JDK 1.5特性;这是Gson的最低版本,特别是注释和泛型。

Gson uses JDK 1.5 features heavily; that's the minimum version for Gson, specifically annotations and generics.

查看此GSON源代码,其中使用了批注

Check out this piece of GSON source code, where annotations are used

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface SerializedName {
    String value();
}

这篇关于GSON必需的最低Java版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆