Approach
This assignment compares the same three books (Cosmos, An Astronaut’s Guide to Life on Earth, and Welcome to the Universe) loaded from an HTML table and a JSON file into R data frames. I’ll hand-write both files, host them on GitHub, and load them by URL. The main challenge I anticipate is the authors column: JSON stores multiple authors as an array, while an HTML cell holds only text, so I’ll flatten the JSON array into a semicolon-separated string to match. I also expect smaller mismatches, like year loading as text from one source and a number from the other, or the two readers returning different object classes. I’ll inspect and standardize column names, order, and types before comparing, and if the data frames still differ, I’ll report exactly where.
Conclusion
After turning the JSON authors array into a delimited string, the data frames output by each of the sources are completely the same in terms of column names, order, data types, and values. The only structural difference is that the JSON data structure handles the list of authors as an array, whereas the HTML data structure can hold just text inside a cell, requiring the delimiter.