Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lat,lngがnullの場合JSONをパースできずクラッシュする問題を解消 #3

Merged
merged 3 commits into from
Nov 23, 2023

Conversation

YuukiToriyama
Copy link
Owner

背景

ApiImpl.get_city_master()"https://geolonia.github.io/japanese-addresses/api/ja/<都道府県>/<市区町村>.json"からデータを取得してくる際、latおよびlngがnullの場合があり、クラッシュの原因となっていた。

変更点

Townのメンバlatlngの型をOption<f32>に変更した

その他

geolonia/japanese-addresses#148 が解消されたらOptionは外しても良い

API側でlat,lngがnullの場合があり、これが原因でクラッシュすることがあるため
@YuukiToriyama YuukiToriyama self-assigned this Nov 23, 2023
@YuukiToriyama YuukiToriyama changed the title lat,lngがnullの場合パースエラーでクラッシュする問題を解消 lat,lngがnullの場合JSONをパースできずクラッシュする問題を解消 Nov 23, 2023
@YuukiToriyama YuukiToriyama merged commit 82a3470 into main Nov 23, 2023
@YuukiToriyama YuukiToriyama deleted the fix/avoid-crash-when-lat-or-lng-is-null branch March 25, 2024 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant