pojo parse gson with invalid java name
我正在使用来自google-api-client的youtube json:
{
"apiVersion": "2.0",
"data": {
"updated": "2011-01-05T13:48:33.146Z",
"totalItems": 4,
"startIndex": 1,
"itemsPerPage": 1,
"items": [
{
"id": "YfUzMkAlOBI",
"uploaded": "2010-12-29T16:50:47.000Z",
"updated": "2010-12-29T16:50:47.000Z",
"uploader": "devandroidcs",
"category": "Entertainment",
"title": "Teste 2",
"description": "Description do teste2",
"tags": [
"mobile"
],
"thumbnail": {
"sqDefault": "http://i.ytimg.com/vi/YfUzMkAlOBI/default.jpg",
"hqDefault": "http://i.ytimg.com/vi/YfUzMkAlOBI/hqdefault.jpg"
},
"player": {
"default": "http://www.youtube.com/watch?v\u003dYfUzMkAlOBI&feature\u003dyoutube_gdata_player",
"mobile": "http://m.youtube.com/details?v\u003dYfUzMkAlOBI"
}
.
.
.
}
在这一点上,我应该在我的解析java类中创建一个名为default的字段名称。已经用其他字段完成了这个解析工作,问题是,默认是私有java名称,所以我不能调用变量默认值。
我该如何管理?