Skip to content

15 min read

JSON vs Protobuf: how to serialize API data

In one sentence: Serializing is turning your program's data into bytes so they can be sent. JSON, the format of almost every API, has no dates, money or big integers: how to write them is up to you, and it's part of the contract. Protobuf, a binary format, takes less space, but without its schema it can't be read.

What you will learn

  • Explain what serializing is and which kinds of data JSON has, and which it doesn't.
  • Send dates in ISO 8601 and in UTC, money in whole cents and big ids as text, and tell null apart from a field that isn't there.
  • Read a Protobuf message byte by byte and compare it with the same order in JSON.
  • Decide when a binary format pays off and when to stick with JSON.

Before you start, read: 05-openapi.md

The delivery company that uses the shop’s API asks for a new piece of data: when each order was placed, so they can deliver the oldest ones first. Imagine you add it the way you’d write it by hand: "date": "03/10/2026 11:30".

Their program has to guess two things. Is it October 3, or March 10, the way a program in the United States would read it? Is it 11:30 in Madrid, or in Bogotá, where the company has its office? The text doesn’t say.

And that’s not the only trap: the mobile app adds up a cart, €8.50 + €0.10 + €0.20, and gets 8.799999999999999. The data is fine on your server; it gets spoiled when it’s converted to travel, or when it’s read on the other side.

The analogy

Imagine you’re shipping a wardrobe with a courier. It won’t fit in the van in one piece: you take it apart, put the pieces in a box and, when it arrives, someone puts it back together.

You can label each piece with its name, “left door”: anyone understands the box, although the labels take up room. That’s JSON. Or you can number the pieces and send the manual separately: the box weighs less, but without the manual nobody knows what piece 4 is. That’s Protobuf, and the manual is its schema.

Where the analogy breaks down

  • A wardrobe arrives just as it left. Some data doesn’t: a date leaves as a date and arrives as text, and a very big number, with different digits, without anyone warning you.

You’ve already done it: in lesson 2 of Phase 3, JSON.stringify turned an object into text, and JSON.parse did the opposite. Every c.json(order) in your API does it for you.

That’s SerializationTurning data that lives in a program’s memory into bytes that can be sent over the network or saved in a file: JSON text, for example, or a binary format like Protobuf. On the other side, deserializing turns them back into data.Go to definition: turning the data in a program’s memory into bytes that can travel over the network or be saved in a file. Deserializing is the opposite. In JSON, each digit or unaccented letter is one byte.

Your server and the mobile app each store data in their own way, and they need a common format: in public APIs, almost always JSONJSON stands for JavaScript Object Notation.A format for writing data as text, with braces, quotes and colons: {"product":"mug","quantity":2}. People can read it, and so can almost any programming language, and it’s the most common format for the data that travels between a frontend and a backend.Go to definition.

Kind Example
Text "pending"
Number 2, 8.5
True or false true, false
Nothing null
ObjectA value that groups several pieces of data, each with its own name, such as { name: "Mug", price: 8.5 }. Each piece is read with a period and its name, such as product.price.Go to definition {"id":7}
List (ArrayA list of values in order, such as [20, 8.5, 35]. Each value is read by its position, which starts counting at 0: prices[0] is the first one.Go to definition) [1,2,3]

There are no dates, no money, and no difference between whole numbers and decimals. You turn everything else into one of those six things yourself, and how you do it is part of your API’s contract. These are the most common traps.

JSON.stringify turns a date into text, and JSON.parse doesn’t turn it back. Open the REPLREPL stands for Read-Eval-Print Loop.A way of working with a language in which you type a line of code, it runs and you see the result right away, without creating any file. In Node.js, you open it by typing node, with nothing else, in the terminal.Go to definition with node:

In the REPL: a date goes and comes back as text

Ventana de terminal
const date = new Date('2026-10-13T09:30:00Z')
const text = JSON.stringify({ createdAt: date })
text
typeof JSON.parse(text).createdAt

What you will see:

undefined
undefined
'{"createdAt":"2026-10-13T09:30:00.000Z"}'
'string'
  • new Date('…') creates a date from a text, and JSON.stringify writes it as "2026-10-13T09:30:00.000Z": year, month and day; a T; the time with its milliseconds; and a Z.
  • typeof says what kind of data something is: on the way back, createdAt is a text. If the client wants a date, it creates one with new Date(text).

The outputs in this lesson are from Node 26.

That format is ISO 8601, an international standard: it starts with the year, so nobody mixes up the day and the month. The Z means UTC, the reference time for the whole world, with no daylight saving time, and it’s what matters most. Look at the same text without it:

The same text, in two time zones

Ventana de terminal
TZ=Europe/Madrid node -p "new Date('2026-10-13T09:30:00').toISOString()"
TZ=America/Bogota node -p "new Date('2026-10-13T09:30:00').toISOString()"
TZ=America/Bogota node -p "new Date('2026-10-13T09:30:00Z').toISOString()"

What you will see:

2026-10-13T07:30:00.000Z
2026-10-13T14:30:00.000Z
2026-10-13T09:30:00.000Z

TZ=… changes the time zone for that command only. node -p runs the JavaScript in quotes and prints the result, and toISOString() gives the date in UTC.

Without the Z, new Date understands “9:30 here”: 7:30 UTC in Madrid and 14:30 UTC in Bogotá. With the Z, the same everywhere.

Send dates in ISO 8601 and in UTC, with the Z. Each client converts them to its local time only to show them. That’s what the project does: in src/data.ts, the order has a new field:

src/data.ts
// createdAt: when it was placed, as ISO 8601 text in UTC (the final Z): 2026-10-13T09:30:00.000Z.
// JSON has no dates; this way any client, in any time zone, reads it the same.
export interface Order {
id: number;
productId: number;
quantity: number;
status: OrderStatus;
createdAt: string;
}

createdAt is a string, not a Date: what’s stored and what travels is a text. This is how it’s filled in:

src/data.ts
// toISOString() always gives the date in UTC, whatever the server's time zone.
export function createOrder(productId: number, quantity: number, createdAt = new Date()): Order {
const order: Order = {
id: orders.length + 1,
productId,
quantity,
status: 'pending',
createdAt: createdAt.toISOString(),
};
orders.push(order);
return order;
}

createdAt = new Date() is a default value: if it isn’t passed, it’s the current time.

And in src/schemas.ts, the schema that becomes the contract from lesson 5:

src/schemas.ts
export const orderSchema = z
.object({
id: z.number().int().openapi({ example: 7 }),
productId: z.number().int().openapi({ example: 1 }),
quantity: z.number().int().openapi({ example: 2 }),
status: z.enum(['pending', 'paid', 'shipped', 'cancelled']),
// A date and time in ISO 8601: in the contract it shows up as a string with format: date-time.
createdAt: z.iso.datetime().openapi({ example: '2026-10-13T09:30:00.000Z' }),
})
.openapi('Order');

z.iso.datetime() means “a text with a date and time in ISO 8601.” In openapi.json it shows up as "type": "string" with "format": "date-time": whoever reads the contract knows what to expect.

The second problem from the beginning, in examples/money.ts:

examples/money.ts
// Numbers with decimals are stored in binary, and 0.1 has no exact form in binary (just as 1/3
// has none in decimal: 0.3333…). The closest one is stored, and the errors add up.
console.log('0.1 + 0.2 =', 0.1 + 0.2);
console.log('Is 0.1 + 0.2 equal to 0.3?', 0.1 + 0.2 === 0.3);
// A €8.50 mug, a €0.10 sticker and a €0.20 badge.
const totalInEuros = 8.5 + 0.1 + 0.2;
console.log('\nIn euros:', totalInEuros);

The math in money.ts

Ventana de terminal
node examples/money.ts

What you will see:

0.1 + 0.2 = 0.30000000000000004
Is 0.1 + 0.2 equal to 0.3? false
In euros: 8.799999999999999
In cents: 880
To show it: €8.80

Notice the false: 0.1 + 0.2 isn’t 0.3. And the mug, the sticker and the badge add up to 8.799999999999999. It isn’t a JavaScript thing: Python or Java give the same.

The comment in the code explains it: in binary, 0.1 has no exact form, just like 1/3 in decimal (0.3333…). The solution is not to use decimals:

examples/money.ts
// In cents, everything is a whole number: the sums are exact.
const totalInCents = 850 + 10 + 20;
console.log('In cents:', totalInCents);
// Only when it's shown is it turned into euros, with each language's format.
const euros = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'EUR' });
console.log('To show it:', euros.format(totalInCents / 100));
  • In cents, everything is a whole number, and adding whole numbers is exact: 850 + 10 + 20 is 880, always.
  • Intl.NumberFormat writes a number the way each language expects it: with 'en-US' and the euro, €8.80.

Money travels in whole cents, and is turned into euros only to show it. That’s why version 2 of the shop (lesson 4) changed "price": 8.5 to "priceCents": 850, and version 1 translates with Math.round, because 8.29 * 100 gives 828.9999999999999. Payment APIs do the same: in Stripe, "amount": 1099 is $10.99.

JavaScript stores every number the same way, with room for about 16 digits. Up to 2⁵³ − 1, about nine quadrillion, every whole number is exact; above it, not:

In the REPL: an id that’s too big

Ventana de terminal
Number.MAX_SAFE_INTEGER
JSON.parse('{"id":9007199254740993}')
JSON.parse('{"id":"9007199254740993"}')

What you will see:

9007199254740991
{ id: 9007199254740992 }
{ id: '9007199254740993' }

Number.MAX_SAFE_INTEGER is that limit. The id 9007199254740993 arrives as 9007199254740992, a different number, without any error. In quotes, as text, it arrives whole.

It happens for real: the ids of X (formerly Twitter) are 64-bit numbers, and its API sends them as text; its documentation explains it with this very JavaScript problem. Ids that can grow that big, or that come from another system, go as text. The shop’s are small and are still numbers.

A field can be null or not be there. And JavaScript has undefined, which JSON doesn’t know:

In the REPL: null, undefined and a missing field

Ventana de terminal
JSON.stringify({ id: 7, note: undefined, coupon: null })
const order = JSON.parse('{"id":7,"coupon":null}')
order.coupon
order.note

What you will see:

'{"id":7,"coupon":null}'
undefined
null
undefined

JSON.stringify drops the fields that are undefined; null, on the other hand, travels. When reading, coupon exists and is null; note doesn’t exist, and gives undefined.

null says “this field exists and is empty”; a field that isn’t there says “I’m telling you nothing about this.” In a PATCH (Phase 2), {"phone": null} asks to delete the phone number, and {}, to leave it alone. If your API treats both the same, nobody can delete a phone number.

Decide what each field accepts and write it in the schema: in Zod, .optional() lets it be missing, and .nullable() lets it be null.

In JSON, the names travel in every object. Pick a style and don’t mix them: the shop uses productId (camelCase), like JavaScript; GitHub, created_at (snake_case). Put the unit in the name if there’s any doubt, as in priceCents, and get it right the first time: changing a name breaks every client (lesson 4).

Protobuf: a schema, and bytes instead of text

Section titled “Protobuf: a schema, and bytes instead of text”

ProtobufA format for serializing data in binary (bytes that aren’t text), created by Google; its full name is Protocol Buffers. The fields are described in a schema, a .proto file, and the bytes carry each field’s number instead of its name. It takes up less space than JSON, but without the schema it can’t be read.Go to definition (Protocol Buffers) is a binary format, made of bytes that aren’t text, created by Google. The data is described in a SchemaThe description of what some data must look like: which fields it has, whether each one is a number or text, and which values are accepted. A program compares the incoming data with it and says whether it matches or what’s wrong.Go to definition, a .proto file. This is the order, in examples/order.proto:

examples/order.proto
// The same order the API sends in JSON, described for Protobuf. Each field carries a number: the
// bytes carry that number, not the field's name.
syntax = "proto3";
package shop;
// An enum: in the bytes, the status is a small number, not a text like "pending".
enum Status {
STATUS_UNSPECIFIED = 0;
PENDING = 1;
PAID = 2;
SHIPPED = 3;
CANCELLED = 4;
}
message Order {
uint32 id = 1;
uint32 product_id = 2;
uint32 quantity = 3;
Status status = 4;
string created_at = 5;
}
  • enum Status gives a number to each status. 0 is what’s read if the field isn’t there: that’s why it’s STATUS_UNSPECIFIED, not a real status.
  • message Order describes each field with its type (uint32, a whole number with no sign) and its number. The names use underscores, by Protobuf custom.
  • The = 1, = 2… isn’t a value: it’s the field’s number, and it’s what travels instead of the name.

To use it from Node you need a Package (of code)Ready-to-use code that someone publishes with a name and a version number, so others can install it in their projects instead of writing it. In Node.js, packages are installed with npm and kept in the node_modules folder.Go to definition, protobufjs:

Install protobufjs

Ventana de terminal
npm install protobufjs@8.8.0

What you will see:

added 2 packages, and audited 37 packages in 2s
6 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities

Your timings will be different.

The program that compares the two formats, examples/protobuf.ts, in three parts:

examples/protobuf.ts
import { join } from 'node:path';
import protobuf from 'protobufjs';
/** The bytes, in hexadecimal: two digits per byte. */
const asHex = (bytes: Uint8Array) =>
Array.from(bytes, (byte) => byte.toString(16).padStart(2, '0')).join(' ');

import.meta.dirname is this file’s folder, and join adds order.proto to it. asHex writes each byte in hexadecimal, which counts from 0 to 9 and then goes on from a to f: a byte, from 0 to 255, goes from 00 to ff.

The order in JSON:

examples/protobuf.ts
const order = {
id: 7,
productId: 1,
quantity: 2,
status: 'pending',
createdAt: '2026-10-13T09:30:00.000Z',
};
// In JSON, the field names and the values travel, all as text.
const asJson = Buffer.from(JSON.stringify(order));
console.log(`JSON: ${asJson.length} bytes`);
console.log(asJson.toString());

Buffer.from turns the text into bytes, and .length counts them. And the same order in Protobuf:

examples/protobuf.ts
// The schema says which fields there are, of what type and with what number. Without it, the
// bytes can't be read.
const schema = await protobuf.load(join(import.meta.dirname, 'order.proto'));
const Order = schema.lookupType('shop.Order');
// protobufjs calls the fields productId and createdAt, even though in the .proto they're
// product_id and created_at. The status goes with the enum's name.
const message = Order.fromObject({ ...order, status: 'PENDING' });
const asProtobuf = Order.encode(message).finish();
console.log(`\nProtobuf: ${asProtobuf.length} bytes`);
console.log(asHex(asProtobuf));
// And the other way round: with the same schema, the bytes become the order again.
const decoded = Order.toObject(Order.decode(asProtobuf), { enums: String });
console.log('\nRead from the bytes:', decoded);
  • protobuf.load reads the .proto; reading a file takes time, so it carries await (Phase 3). lookupType looks up the Order message in it.
  • fromObject prepares a copy of the order that follows the schema, with the status as the enum calls it, and encode(…).finish() serializes it: it gives the bytes.
  • decode does the opposite, and toObject gives a normal object; { enums: String } asks for the status by its name.

The same order, in JSON and in Protobuf

Ventana de terminal
node examples/protobuf.ts

What you will see:

JSON: 93 bytes
{"id":7,"productId":1,"quantity":2,"status":"pending","createdAt":"2026-10-13T09:30:00.000Z"}
Protobuf: 34 bytes
08 07 10 01 18 02 20 01 2a 18 32 30 32 36 2d 31 30 2d 31 33 54 30 39 3a 33 30 3a 30 30 2e 30 30 30 5a
Read from the bytes: {
id: 7,
productId: 1,
quantity: 2,
status: 'PENDING',
createdAt: '2026-10-13T09:30:00.000Z'
}

93 bytes against 34, and when they’re read with the schema, the order comes back whole. If you get Cannot find package 'protobufjs', you still have to install it; if you get no such file, order.proto isn’t in examples/.

Those 34 bytes can be read by hand:

Bytes What they say
08 07 Field 1 (id), a number: 7
10 01 Field 2 (product_id): 1
18 02 Field 3 (quantity): 2
20 01 Field 4 (status): 1, which is PENDING
2a 18 Field 5 (created_at), a text of 18 bytes, which is 24 in decimal
32 30 32 36 … 2026-10-13T09:30:00.000Z, letter by letter: 32 is “2”, and 30 is “0”

The first byte of each row is the field’s number times 8, plus 0 if it’s a number or 2 if it’s a text: field 5 gives 42, 2a. No names, no quotes, no braces: that’s where the savings come from. The date, on the other hand, is still text: 26 of the 34 bytes.

A program reading with an old .proto skips the field numbers it doesn’t know. That’s why adding a field with a new number breaks nobody, and a number that has been used is never reused.

JSON Protobuf
Reading it At a glance, with curl or DevTools Only with the schema and a program
Size Bigger: the names go in every object Smaller: this order, a bit more than a third
Schema Optional, like your OpenAPI Required: the .proto
Where it’s used Public APIs and websites Between the services of one company

Size is a bit misleading: responses are usually compressed before they travel (Phase 2), and what repeats most in JSON, the names, is what compresses best. You’ll measure it in “Try it.”

Protobuf pays off when you control both sides and the volume is huge: a company’s services that call each other thousands of times per second, almost always with gRPC (lesson 9). For an API used by people you don’t know, JSON: it can be read with curl, without asking you for the schema.

The goal: for each order to say when it was placed, without breaking any client, and to measure how much space it takes. You start from your project from lesson 5, in ~/backend-course/phase-3/shop-api. If you get stuck, download this lesson’s folder and compare it with yours: from ~/backend-course/phase-3, curl -O https://backenddesdecero.com/practicas/shop-api/15-serialization.tar.gz and tar -xzf 15-serialization.tar.gz.

  1. In src/data.ts, replace the interface Order and the createOrder function with the ones from “Dates: ISO 8601 text, in UTC.”
  2. In the same file, replace the sample orders with these:
src/data.ts
// 25 sample orders, so there's something to paginate. The oldest ones are already shipped; the
// ones in the middle, paid; the newest ones, pending. One every 7 hours from October 1st.
const FIRST_ORDER = new Date('2026-10-01T09:00:00Z').getTime();
const SEVEN_HOURS = 7 * 60 * 60 * 1000;
for (let number = 1; number <= 25; number++) {
const createdAt = new Date(FIRST_ORDER + (number - 1) * SEVEN_HOURS);
const order = createOrder((number % 3) + 1, (number % 4) + 1, createdAt);
if (number <= 12) order.status = 'shipped';
else if (number <= 20) order.status = 'paid';
}

One every seven hours from October 1 at 9:00 UTC: getTime() gives the date in milliseconds, and adding SEVEN_HOURS to it moves it seven hours forward. With fixed dates, your list comes out the same as here.

  1. In src/schemas.ts, add createdAt to the orderSchema schema, as above.

Start the server with npm run dev and, in another terminal, ask both versions of the API for the first order:

1. Order 1, in v2 and in v1

Ventana de terminal
curl -w '\n' localhost:3000/v2/orders/1
curl -w '\n' localhost:3000/v1/orders/1

What you will see:

{"id":1,"productId":2,"quantity":2,"status":"shipped","createdAt":"2026-10-01T09:00:00.000Z"}
{"id":1,"productId":2,"quantity":2,"status":"shipped","createdAt":"2026-10-01T09:00:00.000Z"}

Both give createdAt: a new field breaks nobody, and there’s no need for a version 3. If it doesn’t show up, check that you saved data.ts and that the server restarted.

2. A new order, with the current time

Ventana de terminal
curl -w '\n' --json '{"productId":2,"quantity":1}' localhost:3000/v2/orders

What you will see:

{"id":26,"productId":2,"quantity":1,"status":"pending","createdAt":"2026-10-13T15:39:11.027Z"}

Your date and time will be different, and in UTC: in New York, four hours ahead of your clock in summer and five in winter.

Create the examples/ folder with the three files from “How it really works,” install protobufjs if you didn’t, and run both examples: you should get the same numbers. Then restart the server (Ctrl + C and npm run dev), so that only the 25 sample orders are there, and measure the list:

3. The list of orders, uncompressed and compressed

Ventana de terminal
curl -s 'localhost:3000/v2/orders?limit=50' | wc -c
curl -s 'localhost:3000/v2/orders?limit=50' | gzip | wc -c

What you will see:

2343
332

wc -c counts the bytes that reach it through the PipeThe terminal’s | symbol: it connects two programs, so what the first one writes reaches the second one as input.Go to definition, and gzip compresses them first. On a Mac, wc writes spaces in front of the number, and gzip can be a few bytes off.

From 2343 bytes to 332. In Protobuf, those 25 orders would take about 900 uncompressed: 34 per order, and two more for being in a list. The compressed JSON takes less than the uncompressed Protobuf. That’s why size alone rarely justifies a binary format in a public API: it’s enough for your server, or its CDNCDN stands for Content Delivery Network.A network of servers spread around the world that serves a website from the one closest to each user, so the round trip is short. example.com sits behind Cloudflare’s.Go to definition, to compress the responses.

Challenge: in examples/protobuf.ts, delete the createdAt line from the order and run it again. Before you look: how many bytes do you think each format will take, and why?Show answer
JSON: 54 bytes
{"id":7,"productId":1,"quantity":2,"status":"pending"}
Protobuf: 8 bytes
08 07 10 01 18 02 20 01
Read from the bytes: { id: 7, productId: 1, quantity: 2, status: 'PENDING' }

JSON goes down from 93 to 54 bytes, and Protobuf, from 34 to 8: the date was 26. Without text, Protobuf takes almost seven times less: it saves on names and numbers, not on text. Afterwards, put the line back: the tests count on it.

Now, the tests you have from lesson 5:

4. The tests from before

Ventana de terminal
npm test

What you will see:

ℹ tests 51
ℹ suites 0
ℹ pass 50
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 2019.751872
✖ failing tests:
test at test/rest.test.ts:58:1
✖ PATCH /orders/:id changes the quantity and returns the whole order (4.120161ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
{
+ createdAt: '2026-10-13T15:39:07.456Z',
id: 27,
productId: 1,
quantity: 5,
status: 'pending'
}
at TestContext.<anonymous> (file:///Users/ana/backend-course/phase-3/shop-api/test/rest.test.ts:62:10)

It’s a piece of the end of the output, with the Linux path replaced by a Mac one. Notice the line with +: a field the test didn’t expect, because it compared the whole order with deepEqual.

Your API hasn’t broken anything: the test was a client that’s too strict. It’s the rule from Phase 0: be strict with what you send and tolerant with what you receive. The new test compares the order without createdAt. Bring in the tests from this lesson’s folder, the one you downloaded at the beginning:

5. This lesson’s tests

Ventana de terminal
cp -r ../15-serialization/test .
npm test

What you will see:

ℹ tests 57
ℹ suites 0
ℹ pass 57
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 1220.938046

The end of the output: 57 tests and fail 0. Six are new, in test/serialization.test.ts, and two of them run your examples: if they fail, compare your examples/ with the one in the download.

  • Apps that say “5 minutes ago” or show a message’s time in your time zone: the server usually sends the date in UTC, and the app converts it to your time.
  • Prices in online stores. In the Network tab of DevTools (how to open them), many of them answer with amounts in cents, like 1999, and the page writes “$19.99”.
  • Dates without a time zone, like "2026-10-13 11:30": each client reads them in its own time.
  • Money with decimals: tiny errors that add up.
  • Big ids as numbers: JSON.parse rounds them without warning.
  • Treating null and a missing field the same. In a PATCH, one deletes and the other leaves things alone.
  • A client that compares the whole response: it fails with every new field.
  • Moving to Protobuf to save bytes without compressing the responses first.
  • Serializing is turning data into bytes. JSON has no dates, money or big integers: how you write them is part of the contract.
  • Dates in ISO 8601 and in UTC, with the Z; money in whole cents; huge ids, as text.
  • null and a missing field are different things, and a client ignores the fields it doesn’t know.
  • Protobuf sends field numbers instead of names: the order goes from 93 to 34 bytes, but without the .proto it can’t be read.
  • For a public API, compressed JSON; a binary format, between your own services with a lot of traffic.
The server, in Madrid, sends an order’s date as “2026-10-13T11:30:00”, with nothing at the end. The app reads it in Bogotá with new Date. What time does it understand?

The cart adds up 8.5 + 0.1 + 0.2 in euros and adds a gift if the total is 8.8 or more. What happens with a mug, a sticker and a badge?

A payment gateway sends you a payment with the id 9007199254740993, as a number. Your Node server stores it and, the next day, looks that payment up. What happens?

A PATCH /profile receives a body in which phone is null. What should the API understand?

You add createdAt to the orders and the mobile app starts failing: it checks that each order has exactly the fields it expects. What happened?

The shop is going to open its API to any developer who wants to build apps with it. The responses are already compressed. JSON or Protobuf?

phase-4 · lesson 6/9