segFaultCity / ZephyrGroup3

Zephyr project done by Group 3 of 4320.
3 stars 2 forks source link

Change format from plain text to JSON on web service #13

Closed segFaultCity closed 5 years ago

segFaultCity commented 5 years ago

Problem: The web service the Zephyr app executes its GET request for returns plain text, which is hard to parse and in turn makes it hard to grab the time needed for the alarm. Solution: Change the returned data of the web service to JSON format so the zephyr app can parse it using C language.

segFaultCity commented 5 years ago

This issue was solved by using PHP json_encode. After pulling from the database, we pushed the selected data into an array and encoded it to JSON format. Now when the zephyr app makes a request to our site, it has the information as JSON and can now parse it to pick individual times and create alarms.