【发布时间】:2019-02-02 07:28:31
【问题描述】:
我有一个使用 Point 的地址对象
address.Location = new Point(-0.332437, 51.374954);
使用 JsonConvert.SerializeObject(address); 下面会正确输出JSON
"Location": {
"type": "Point",
"coordinates": [
-0.332437,
51.374954
]
但是,如果我将此对象作为 WebAPI 的一部分返回,它只会返回
"location": {
"type": "Point",
"coordinates": {}
}
没有返回坐标,看不出为什么结果会不同。谢谢。
(DocumentDB 客户端 1.22,aspnetcore 2.1)
【问题讨论】:
标签: azure-cosmosdb asp.net-core-webapi