@iamhueman JSON is a way of representing data, and isn’t all that complicated (I think – disclaimer: I do things like this for my day job, so my perspective may be skewed by that).
The harder parts (for me – again, your experience may vary) were learning how to do what I needed within the constraints of HA (which I’m still fairly new to).
A sensor in HA always has a state (sometimes called a value), and it may have additional attributes. Some of the complications here arise from the fact that I’m hacking around this for the rest sensor, and providing a fake “OK” state (see value_template in my paste), and then shoving all the important JSON bits into the attributes.
Converting the JSON fields into attributes is done with the following 2 parameters on the rest sensors:
json_attribute_pathjson_attributes
The first uses “JSONPath” notation (which was new to me) to tell the sensor which part of the JSON we’re interested in. I got this part right by taking the JSON output from AirNow’s query builder and running it through jsonpath.com with various queries until I figured out what I was clever enough to do (or not do). The second part tells HA which JSON fields we actually want our sensor to report.
In the end, you wind up with 3 sensors for each air quality thing(PM2.5, O3, etc) you are tracking; one is the “raw” data from the AirNow API, and the other 2 are the AQI measurement & category/description.
Most of the concepts here will carry over to any other API you try to apply them to (if it uses JSON), but the details of how to use any one API to get the data you want out of it will vary from API to API. AirNow was a fairly easy one to get working in HA without a formal integration, though!