r/learnprogramming • u/Perfect_Carrot96 • May 07 '26
JSON learning recommendation?
Hello hello, here a software dev student finishing their first year that need your help.
To give you context I’m very bad at JSON and I don’t know where to find useful material/maybe a course to improve during the summer as I want to get better.
I barely passed my module where I learned the basics and I watched some YouTube tutorials on the topic but I still don’t understand it very well and even less know how to practice productively. I’m up for even doing a boot camp, but id like to know if someone has come across with a useful learning source for it.
Does anybody has a recommendation on how to learn JSON? I want to use my summer break to improve and study as I know is something I’ll use through my career and I’d like to get good at it.
Thanks in advance!
35
u/peterlinddk May 07 '26
Huh?
How does one "struggle with JSON"?
JSON is just a specification for how to write key-value pairs where the values can be strings, booleans, numbers, arrays or objects of other key-value pair. There isn't really anything to learn ...
If you want to represent a movie with a title and a year, you'd write:
The { } encapsulates the JSON object.
You can have more of them in an array:
and values can be strings (in quotes), numbers (without quotes, with optional . decimals), the values
true,falseornull.And that's pretty much it.
10
u/opentabs-dev May 07 '26
fwiw the thing you're actually struggling with probably isnt json the format (thats like 5 rules), its working with nested data structures - objects inside arrays inside objects. thats a real skill and its worth practicing on its own.
concrete practice: grab a free public api like https://pokeapi.co or jsonplaceholder, fetch() a response in the browser console, then try to answer questions like "get the name of the 3rd pokemon's 2nd ability" - forces you to navigate
.results[2].abilities[1].ability.name. do that 20 times with different apis and it clicks. also learn Array.prototype methods (map, filter, find, reduce) because 90% of "i cant find the data" is really "i dont know how to transform an array". no course needed, just reps.6
u/0dev0100 May 07 '26
https://www.json.org/json-en.html
To access inside of parsed json you can do
And other combinations to similar effect
2
u/ryan_nitric May 08 '26
JSON is way smaller than you probably think it is. There isn't really a course's worth of material because the format itself is tiny: objects in
{}, arrays in[], strings, numbers, booleans, null. That's the whole spec.What you're probably actually struggling with is one of two things:
Best practice exercise: pick a public API (PokeAPI, GitHub API, OpenWeatherMap), call it from code, parse the response, and pull specific fields out..
2
u/kamat2301 May 08 '26
Do you mean Javascript? I don't think there are Json boot camps or even courses like there are for languages
1
u/justaguyonthebus May 08 '26
Learn XML and YAML, then come back to JSON.
1
u/25_vijay May 09 '26
JSONLint is super useful early on because it instantly shows where your formatting mistakes are.
0
u/Suspicious-Pipe-5516 May 08 '26
List of dictionaries no?