Okay I'd like to do a little dance at the beginning of this video.
um in this video, I am planning to talk about JSON exclusively.
What is this data format JSON?
How is it- What does it look like? What does it mean?
And if you happen to have data in a JSON format
How do you use that data in a program that you're writing?
something that runs in a web browser and javascript using p5.js library.
Okay- so I have some information that I talked about in the previous video.
If you watched that previous video by the way, thank you.
That was kind of you.
Um so let's say, the scenario that I'm posing here,
You're interested in flowers.
And you looked all over the internet, you couldn't find any information about flowers.
But you have this book all about flowers!
Here's something you could actually do- novel concept
You could just type the data yourself into a file to use in your program.
So let's first think about how that might work.
So actually even before I start doing anything over here
let's do that just even in our code.
Right so you know- you - you know how to program, or at least I do
I think you do if you were watching the videos hopefully.
Because I don't know if I was doing a good job or not.
But you might say to yourself like "ah I am going to make this object called flowers"
And it's going to have a name.
I'm just going to say it's a flower.
It's going to have a name, like sunflower.
And it's going to have color, which is
I was going to do color but then I realised there's a problem.
I should just admit that there's a problem here, so what I started doing by the way
was that I want to use the p5.js color function which is so nice
that I can make a nice yellow color- which yellow is red and green I think.
But that's not going to work up here.
The color function is only available once I'm actually in setup, once the page has loaded.
So I'm going to make that global variable,
and I'm going to make my object here, sorry.
So name- sunflower, color is- uh let's not name it color because that's a keyword.
Let's name it C-O-L is color.
How do you make yellow?