[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:02.47,0:00:05.44,Default,,0000,0000,0000,,Okay I'd like to do a little dance at the beginning of this video. Dialogue: 0,0:00:05.44,0:00:09.68,Default,,0000,0000,0000,,um in this video, I am planning to talk about JSON exclusively. Dialogue: 0,0:00:09.78,0:00:11.83,Default,,0000,0000,0000,,What is this data format JSON? Dialogue: 0,0:00:11.85,0:00:14.18,Default,,0000,0000,0000,,How is it- What does it look like? What does it mean? Dialogue: 0,0:00:14.18,0:00:17.18,Default,,0000,0000,0000,,And if you happen to have data in a JSON format Dialogue: 0,0:00:17.18,0:00:19.84,Default,,0000,0000,0000,,How do you use that data in a program that you're writing? Dialogue: 0,0:00:19.84,0:00:23.44,Default,,0000,0000,0000,,something that runs in a web browser and javascript using p5.js library. Dialogue: 0,0:00:23.44,0:00:27.13,Default,,0000,0000,0000,,Okay- so I have some information that I talked about in the previous video. Dialogue: 0,0:00:27.13,0:00:29.45,Default,,0000,0000,0000,,If you watched that previous video by the way, thank you. Dialogue: 0,0:00:29.45,0:00:31.20,Default,,0000,0000,0000,,That was kind of you. Dialogue: 0,0:00:31.30,0:00:34.72,Default,,0000,0000,0000,,Um so let's say, the scenario that I'm posing here, Dialogue: 0,0:00:35.02,0:00:37.07,Default,,0000,0000,0000,,You're interested in flowers. Dialogue: 0,0:00:37.26,0:00:41.53,Default,,0000,0000,0000,,And you looked all over the internet, you couldn't find any information about flowers. Dialogue: 0,0:00:41.71,0:00:44.18,Default,,0000,0000,0000,,But you have this book all about flowers! Dialogue: 0,0:00:44.47,0:00:47.38,Default,,0000,0000,0000,,Here's something you could actually do- novel concept Dialogue: 0,0:00:47.44,0:00:51.86,Default,,0000,0000,0000,,You could just type the data yourself into a file to use in your program. Dialogue: 0,0:00:51.95,0:00:54.24,Default,,0000,0000,0000,,So let's first think about how that might work. Dialogue: 0,0:00:54.34,0:00:57.06,Default,,0000,0000,0000,,So actually even before I start doing anything over here Dialogue: 0,0:00:57.22,0:00:59.24,Default,,0000,0000,0000,,let's do that just even in our code. Dialogue: 0,0:00:59.46,0:01:03.96,Default,,0000,0000,0000,,Right so you know- you - you know how to program, or at least I do Dialogue: 0,0:01:04.05,0:01:06.50,Default,,0000,0000,0000,,I think you do if you were watching the videos hopefully. Dialogue: 0,0:01:06.63,0:01:08.48,Default,,0000,0000,0000,,Because I don't know if I was doing a good job or not. Dialogue: 0,0:01:08.65,0:01:15.86,Default,,0000,0000,0000,,But you might say to yourself like "ah I am going to make this object called flowers" Dialogue: 0,0:01:15.99,0:01:23.18,Default,,0000,0000,0000,,And it's going to have a name. \NI'm just going to say it's a flower. Dialogue: 0,0:01:23.28,0:01:25.100,Default,,0000,0000,0000,,It's going to have a name, like sunflower. Dialogue: 0,0:01:26.15,0:01:29.78,Default,,0000,0000,0000,,And it's going to have color, which is Dialogue: 0,0:01:29.100,0:01:34.26,Default,,0000,0000,0000,,I was going to do color but then I realised there's a problem. Dialogue: 0,0:01:34.40,0:01:36.86,Default,,0000,0000,0000,,I should just admit that there's a problem here, so what I started doing by the way Dialogue: 0,0:01:36.86,0:01:40.08,Default,,0000,0000,0000,,was that I want to use the p5.js color function which is so nice Dialogue: 0,0:01:40.18,0:01:43.44,Default,,0000,0000,0000,,that I can make a nice yellow color- which yellow is red and green I think. Dialogue: 0,0:01:43.53,0:01:45.66,Default,,0000,0000,0000,,But that's not going to work up here. Dialogue: 0,0:01:45.72,0:01:50.64,Default,,0000,0000,0000,,The color function is only available once I'm actually in setup, once the page has loaded. Dialogue: 0,0:01:50.74,0:01:53.50,Default,,0000,0000,0000,,So I'm going to make that global variable, Dialogue: 0,0:01:53.63,0:01:55.81,Default,,0000,0000,0000,,and I'm going to make my object here, sorry. Dialogue: 0,0:01:55.88,0:02:02.06,Default,,0000,0000,0000,,So name- sunflower, color is- uh let's not name it color because that's a keyword. Dialogue: 0,0:02:02.13,0:02:05.32,Default,,0000,0000,0000,,Let's name it C-O-L is color. Dialogue: 0,0:02:05.36,0:02:07.24,Default,,0000,0000,0000,,How do you make yellow?