Implementing an advanced API
Until now, we’ve been working with a very simple database, and implementing pretty straightforward APIs. From time to time, however, your client will ask for something more difficult or complex. Let’s take a look at one such requirement.
The client has asked for the ability to see a car with all its options. We’ll provide that in JSON for easy display on the web, phone, and so on. The JSON will look like this:
{ "id": 2, "name": "buick skylark 320", "mpg": null, "cylinders": null, "displacement": null, "horsepower": null, "weight": null, "acceleration": null, "modelYear": null, "origin"...