Registration morningscene 5 / 15~3 min
The payload, opened
What Case actually sent, readable at last.
Time to open the envelope.
The cargo inside a request has its own name. Engineers call it the payloadConcept · lights on your mappayloadThe meaningful data a request or response is transporting. Close enough to “body” in most conversations. When somebody says the backend validates the payload, they mean it checks this data before trusting it., and Case’s payload is the form: everything typed at the kitchen table, packed for travel. Here it is, exactly as it rode.
{"name": "Case","dateOfBirth": "1998-03-14","email": "sk8rcase04@example.com","estimatedFinish": "4:20:00","firstMarathon": true,"notify": ["email", "push"]}How to read it
Every value in there is one kind of thing, and the kind has a name: its data typeConcept · lights on your mapdata typeThe kind of value a program is working with, which determines what it represents and what can be done with it. The ones you meet constantly are strings, numbers, and booleans.. Text in quotes is a string. true is a boolean, and a boolean is allowed exactly two opinions. The kind matters: you can uppercase a string and you cannot uppercase a date, and half of all mundane bugs are a value of one kind being treated as another.
The square brackets hold a listConcept · lights on your maplistA structure holding multiple values together, in order: a cart’s items, a feed’s posts. Many languages call essentially the same idea an array.. Case wants notifying by email and by push, in that order of preference, and a list is how an order of things travels.
And the braces around the whole thing make it an objectConcept · lights on your mapobjectA structure grouping related values that describe one thing, each value under a label. Nearly everything a product manages (a user, an order, an entry) travels through code as one.: one thing, described by its parts. One entry, one runner, one small parcel of hope with a slightly embarrassing email address.
The format has a name too
The way it is all written down, braces, brackets, quotes, commas, is JSONConcept · lights on your mapJSONJavaScript Object Notation: a text format for exchanging structured data as objects, lists, strings, numbers, booleans, and null. Born in JavaScript and long since everybody’s: applications in nearly every language read and write it. — the web’s common handwriting. When two systems that have never met exchange anything this morning, the odds are overwhelming that it looks like what you just read.
You have now read a payload. That is not a small thing, and the story will trade on it from here.