生成重复对象的Google GAE json输出(已关闭)是Api问题

时间:2015-11-04 18:09:55

标签: java google-app-engine gson

我有一个我在GAE上部署的java应用程序。我正在使用Gson进行序列化和反序列化。我也在使用joda-time 2.4。

当我在eclipse上运行app作为java应用程序时... json输出如下所示:(简化了json)

{
"_id": "gasqi2ceL3caLHcMc",
"resultHeader": {
    "enterprise": "ABC Corp"
},
"craneScheduleList": [
    {
        "craneId": "crane3",
        "scheduleMemberList": [
            {
                "scheduleStartTimeUTC": "2015-10-04T13:00:00.000Z",
                "scheduleEndTimeUTC": "2015-10-04T13:18:00.000Z",
                "status": "OPERATIONAL",
                "load": {
                    "loadId": "00004",
                    "loadSequenceNumber": 1,
                    "assetsInLoadList": [
                        {
                            "assetId": "10128"
                        },
                        {
                            "assetId": "10135"
                        }
                    ]
                }
            },
            {
                "scheduleStartTimeUTC": "2015-10-04T13:18:00.000Z",
                "scheduleEndTimeUTC": "2015-10-04T13:27:00.000Z",
                "status": "OPERATIONAL",
                "load": {
                    "loadId": "00002_1",
                    "loadSequenceNumber": 2,
                    "assetsInLoadList": [
                        {
                            "assetId": "10150"
                        }
                    ]
                }
            }
        ]
    }
]
}

当我在GAE引擎上运行相同的数据时...输出显示每个对象的3个重复项,如下所示:

{
"_id": "gasqi2ceL3caLHcMc",
"resultHeader": {
    "enterprise": "ABC Corp"
},
"craneScheduleList": [
    {
        "craneId": "crane3",
        "scheduleMemberList": [
            {
                "scheduleStartTimeUTC": "2015-10-04T08:00:00.000Z",
                "scheduleEndTimeUTC": "2015-10-04T08:18:00.000Z",
                "status": "OPERATIONAL",
                "load": {
                    "loadId": "00004",
                    "loadSequenceNumber": 1,
                    "assetsInLoadList": [
                        {
                            "assetId": "10128"
                        },
                        {
                            "assetId": "10135"
                        }
                    ]
                }
            },
            {
                "scheduleStartTimeUTC": "2015-10-04T08:00:00.000Z",
                "scheduleEndTimeUTC": "2015-10-04T08:18:00.000Z",
                "status": "OPERATIONAL",
                "load": {
                    "loadId": "00004",
                    "assetsInLoadList": [
                        {
                            "assetId": "10128"
                        },
                        {
                            "assetId": "10135"
                        }
                    ]
                }
            },
            {
                "scheduleStartTimeUTC": "2015-10-04T08:00:00.000Z",
                "scheduleEndTimeUTC": "2015-10-04T08:18:00.000Z",
                "status": "OPERATIONAL",
                "load": {
                    "loadId": "00004",
                    "loadSequenceNumber": 1,
                    "assetsInLoadList": [
                        {
                            "assetId": "10128"
                        },
                        {
                            "assetId": "10135"
                        }
                    ]
                }
            }
        ]
    }
]
}

我不确定为什么在GAE上运行应用程序时会创建重复的对象。如果问题存在于我的期望中,或者我在这里遗漏了一些东西,想要得到一些意见。

0 个答案:

没有答案