Join Peter Gruenbaum for an in-depth discussion in this video Create JSON solution, part of Learn API Documentation with JSON and XML.
(electronic chime)…- [Instructor] In part one of the JSON challenge,…I walked you through creating the JSON that you see here…and this is for a single day weather forecast.…But then in part two, you were challenged to come up with…JSON for a three day forecast.…So let me show you what that looks like.…Here is the forecast.json file which contains the solution.…So the very first thing we have is a top-level object…so we have curly brackets here…and they end with curly brackets at the very bottom.…
And then there's a forecast key and a colon,…and then an array because the array is going to hold…multiple days worth.…So the array is a square bracket and again,…you can that it ends down here.…And then you've got an object…and this is what you did in part one.…You created an object for Monday's forecast.…That's always followed with a comma…and then a very similar object,…which is the forecast for Tuesday's object.…
And then for Wednesday, the very last one,…I said, "Well, what if there's no data?"…You should just put in null.…
- The purpose of documentation
- Data types
- Structured data
- Writing JSON and XML
- Documenting one-level JSON responses
- Documenting nested JSON responses
- XML attributes and examples
- Documenting XML
- Structuring data documentation
Skill Level Intermediate
Agile Project Management Principleswith Bob McGannon1h 16m Appropriate for all
Technical Writing: Reportswith Judy Steiner-Williams2h 30m Appropriate for all
Introduction to JSON and XML Documentation
Next steps1m 10s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.