OSM-Surveyor
OSM-Surveyor copied to clipboard
Use JSON for quest definitions
It looks like you’re planning to have one class per quest type. It would be great to have quest definitions be generated from JSON instead, which would make it possible for end users to create quests without needing to rebuild the app, and would also more easily allow sharing quests with other applications.
I also believe that with a little scripting we could scrape the majority of the quests from StreetComplete which would provide a big head-start with creating quests.
Here's a JSON file derived from StreetComplete (using an awk script plus lots of manual cleanup) that defines the quests it supports. If there's interest I'll write some additional script to generate answers as well: Quests.json.zip
Thanks for the input, @bryceco, appreciate it! I am very open for pull requests.
In its current state, the app is using classes for the quests, as it makes it easier right now to add new functionality to them (as compared to adding the functionality and adjusting the JSON parser). However, for an easier exchange of basic quests, having a portable JSON definition is definitely feasible.
@wtimme are you interested in additional yes/no quest classes? Or are the existing two enough to continue testing before moving to a different arrangement?
We could add new classes, but in order for the app to fulfill an actual use case, we should probably first focus on enabling mappers to actually upload their answer, since that is currently not done yet.