You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在VB.NET中将谷歌Waypoint API返回的JSON转换为类?

嘿,我帮你把这段内容整理成清晰易读的Markdown格式啦,不管是自己参考还是和团队分享都方便不少:

Google Waypoint API 对应VB.NET类定义(Visual Studio选择性粘贴生成)

这是根据Google Waypoint API返回的JSON结构,通过VS的「选择性粘贴」功能自动生成的类,直接就能用来反序列化API返回的JSON数据:

Public Class Rootobject
    Public Property geocoded_waypoints() As Geocoded_Waypoints
    Public Property routes() As Route
    Public Property status As String
End Class

Public Class Geocoded_Waypoints
    Public Property geocoder_status As String
    Public Property place_id As String
    Public Property types() As String
End Class

Public Class Route
    Public Property ...
End Class

如果后续需要补全Route类的具体属性,只要把API返回的完整JSON再用VS的选择性粘贴功能处理一遍就行,非常省心~

内容的提问来源于stack exchange,提问作者MatthEW

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 08:39:54