如何生成有效的Geojson模式?

问题描述

我正在尝试使用不带匿名字段的njsonSchema dll从geojson内容生成模式

C#:示例=> var schemaFromFile = JsonSchema.FromSampleJson(requestBody); Console.WriteLine(schemaFromFile.ToJson());

Geojson内容

New_Main_Folder/sub_folder_1/abc.wav
New_Main_Folder/sub_folder_2/abc.wav
New_Main_Folder/sub_folder_3/abc.wav

结果

{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[102,0.5]},"properties":{"prop0":"value0"}},{"type":"Feature","geometry":{"type":"Linestring","coordinates":[[102,0],[103,1],[104,[105,1]]},"properties":{"prop0":"value0","prop1":0}},"geometry":{"type":"polygon","coordinates":[[[100,[101,[100,0]]]},"prop1":{"this":"that"}}}]}

匿名类型过多。 是否可以通过字段的真实名称更改Anonymous?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)