我正在尝试使用http://www.jsonschema2pojo.org/将JSON响应中提到的部分从预测api转换为POJO。当我尝试将其转换为pojo时,错误显示
There's a problem: Unexpected character ('l' (code 108)): was expecting double-quote to start field name (line 2, column 2)
现在我看到我需要在每个json响应的关键参数上使用双引号。所以我手动输入双引号,然后我得到了pojo类。所以我的问题是每次都必须这样做并对每一个键应用双引号?我还缺少其他任何技巧吗?
{
latitude: 45.4925827,
longitude: -73.57789,
timezone: "America/Montreal",
offset: -4,
currently: {
time: 1496155473,
summary: "Clear",
icon: "clear-day",
nearestStormDistance: 12,
nearestStormBearing: 155,
precipIntensity: 0,
precipProbability: 0,
temperature: 63.32,
apparentTemperature: 63.32,
dewPoint: 57.94,
humidity: 0.83,
windSpeed: 9.87,
windBearing: 152,
visibility: 10,
cloudCover: 0.14,
pressure: 1015.05,
ozone: 346.1
}
}