So, an RFC is a request for comments. That's technically what it means, but what it really is is a definition of a protocol or format, a standard definition. Now, reason why we're concerned with these they're not part of goaling directly, but whenever you write a big program, you'll to do something, you going to want to interact with other systems, other blocks of data somehow. I mean it is extremely common. So, for instance, maybe you want your program to read files, read database files and process them, right? So, these database files they maybe they came from some other source, some data maybe somebody inserted them on the web add edits MySQL database and you want to be able to read those files, right? So, there's got to be some format that everybody agrees on, that you can communicate through. So, this is going to be in this particular format and your code can process that format. Same thing goes for maybe it's a network protocol, right? So, maybe your machine, maybe you want to do client server thing, right? So, you want to make a web client. Your web client needs to talk to a server over the network. In order to talk to a server, it's got to send messages in with that adhere to a particular protocol. So, the server understands what it's getting. Then, on the other end on the receiving end your machine, your program has to be able to understand the format, the protocol of the message that it receives in return, right? So, whenever you make some a bigger system and it needs to interact with other systems, through data transfer. This data has to be formatted in a way that everybody understands it. Say so, there are many of these formats and protocols that are well-defined and are standardized and used for communication and trading data between different systems. There are many of them. RFCs are the name that are used for these protocol a lot of these standards. They're not RPC-based standards but RFC's are a broad swath of standards. So, for instance, let's give you some examples. Take HTML, HyperText Markup Language. HTML is the language in which web pages are written. So, it's a standardized language actually is RFC. I got the RFC number right there on the slide. It's a standardized language so that all clients, all web browsers they have to understand this language so they know how to render it on the screen and so on. So, that's one of those languages to standardize and you can trade data between a client and a server, between a web client web server using this standard. Also URIs, right? These are also there it's an RFC too. URI stands for a Uniform Resource Identifier. It's basically the addressing method use on the web, right? So, you've heard of a URL this type of URI. So, there's a particular format and the way that it's supposed to see and that it's got to adhere to a particular format so that every client, every server can interpret the address. HTTP, that's a network protocol web page web network protocol defines the web. Hypertext Transfer Protocol, okay? That's RFC 2616 and that describes how the messages should be transferred on the network. So, what information should be included each message and what the headers are. Where the data should be. The content and so on and the lengths stuff like this. That's all defined so that a client can talk to a server, web browser can talk to a web server or something like that. So, these are just a few of the protocols of the standard protocols that are defined by RFCs. They're a lot more and these protocols can be arbitrarily complicated some of them, right? Some of them are simple, some of them are complicated. So, what happens in Golang arrives was like Golang they provide packages that help you to process these formats, a lot of these not all but a lot. So, there are packages for most of the important RFCs, there are packages already built that you can incorporate you can import into your program. So, and these packages they provide a set of functions that you use to encode data into the into whatever the protocol is the format is and also to decode, right? So, if you're receiving something in a particular format from some other source you need to decode that information into structures. Maybe structures, or maps, or some Golang objects, right? The other an encoding is the other direction where you take some go objects and you convert them into this common protocol or format. So, as an example there is a Net/HTTP. That's where that's where HTTP, HyperText Transfer Protocol and they you have that package and it provides a bunch of functions in there that allow you to make to make messages and send them. So, for instance, I've got this example Http.get, that makes a get message you pass it as an argument a web domain and it will make a request to that domain for a web page and it'll return the actual content of the webpage for you, right? So, there are a set of functions like that defined in this package that allow you to communicate over the web, right? Send, so, if you want to make a web client or the web browser web server or something like that you'd use a package like this. Another package a more basic one is the net package and this is for TCP/IP and socket programming. So, this is a long description but TCP/IP basically define the internet. So, Internet you can do web-based communication on the Internet but you can do all communication protocols on the internet FTP, Secure Shell, is a whole list. But, all of them share in common is basic TCP/IP, UDP stack. Set of protocols that they all have to adhere to. So, the net package gives you a set of functions that allow you to use that protocol. So, for instance, this example here net.Dial TCP says, look I want to make a TCP connection and you give it the domain uci.edu:80 tells you the port number, you pass that and it made it establishes a communication or connection Internet connection, TCP connection specifically with uci.edu on that particular port which happens to be a web port but, so, there are a lot of these packages that are used to support to make it easy for you as a programmer, to use these different protocols, communication protocols and data formats that are commonly used by different systems. It's just a very useful thing to have these packages and to use them. Because when you don't have them you have to do it from scratch, meaning you have to. For instance, take HTTP, if I didn't have the HTTP package, I would have to understand everything about HTTP and make the packages on my own. I have to basically make the message format in my own. I have to write my own code to do that. Now, this is not impossible but it is time-consuming why do that when you can call Http.Get it makes it a lot easier for you as a program. So, JSON is one of these protocols is a, is not a protocol it's a data format, commonly used data format across the world and we're going to talk about that and the package associated with it. So JSON stands for JavaScript Object Notation. We are not programming in JavaScript but JSON is bigger than JavaScript. Now, JSON is just widely accepted as a common way to represent structured data. It's RFC 759, it's a format to capture structured data and unstructured data, I mean a set of attribute value pairs. So, this is a natural for a struct or a map, right? Because if you remember structs, they have key they have no keys they don't call them keys. They have fields and values of the fields, right? So, a field value pair, could be an attribute value pair and JSON. Or a map has key value pairs, right? That's the same that can easily be an attribute value pair. So, these attribute value pairs and JSON naturally map. Naturally, no I shouldn't use the word map, they naturally correlate to strucks and maps inside go line. Now, the keys and values or rather attributes and values as they're called in JSON, they can be basic value types. So, you can take Bool, number, strings, arrays, objects and they can be combined hierarchically. So, it's easier if we see some examples of this. So, let's take an example of a startup with a Go structure, right? A Go struct, the person struck that we had before, right? So, this perfect person structure I'm making P1. I'm saying P1's person with a name of Joe, address of a street and a phone number, 123. So, that information maybe we if they want to transfer it to another machine somewhere else, okay? We're going to give it to somebody. So, we want to take it from right now we have represented as a structure in Go. We want to represent in this common JSON format. So, that somebody else, some other program, some other system somewhere can interpret that. So, what we're shown below is the equivalent JSON object. So, up above you see the struct as we would define it in Go. In JSON, what it would look like as a JSON object is shown right there. Notice this is very similar to the structure to what a struct looks like or what a map looks like. It's basically name: Joe. Address: street. Phone: 123. Now, one thing to note is that the name, their field names, the attribute names, name, address, phone, they're in quotes, right? Which they weren't when we define the Go structure, we didn't put them in quotes. So, it's a little bit of difference but notice that it looks very similar to the struct, right? So, that JSON object we can take that and pass that on to some other machine, some of the program and if they can interpret JSON, then they can extract all the information that we were using in our program about this person. This is of course one person but I can have a database full of people. I could just make a set of JSON objects pass to somebody and they could read this database full of people. So, this is just a simple example of JSON. But, JSON is actually nice and it's a good format, it's well accepted.