Skip to content

Commit e386f10

Browse files
committed
Use ZIP+4 as a string, also shows encoding of +
1 parent 656fd21 commit e386f10

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

versions/3.0.4.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,21 +1532,21 @@ In this example, the contents in the `requestBody` MUST be encoded per [RFC1866]
15321532

15331533
When passing complex objects in the `application/x-www-form-urlencoded` content type, the default serialization strategy of such properties is described in the [Encoding Object](#encodingObject)'s [`style`](#encodingStyle) property as `form`.
15341534

1535-
With this example, given an `id` of `f81d4fae-7dec-11d0-a765-00a0c91e6bf6` and a US-style address as follows:
1535+
With this example, given an `id` of `f81d4fae-7dec-11d0-a765-00a0c91e6bf6` and a US-style address (with ZIP+4) as follows:
15361536

15371537
```json
15381538
{
15391539
"streetAddress": "123 Example Dr.",
15401540
"city": "Somewhere",
15411541
"state": "CA",
1542-
"zip": 99999
1542+
"zip": "99999+1234"
15431543
}
15441544
```
15451545

1546-
Assuming the most compact representation of the JSON value (with unnecessary whitespace removed), we would expect to see the following request body, where space characters have been replaced with `+` and `"`, `{`, and `}` have been percent-encoded to `%22`, `%7B`, and `%7D`, respectively:
1546+
Assuming the most compact representation of the JSON value (with unnecessary whitespace removed), we would expect to see the following request body, where space characters have been replaced with `+` and `+`, `"`, `{`, and `}` have been percent-encoded to `%2B`, `%22`, `%7B`, and `%7D`, respectively:
15471547

15481548
```urlencoded
1549-
id=f81d4fae-7dec-11d0-a765-00a0c91e6bf6&address=%7B%22streetAddress%22:%22123+Example+Dr.%22,%22city%22:%22Somewhere%22,%22state%22:%22CA%22,%22zip%22:99999%7D
1549+
id=f81d4fae-7dec-11d0-a765-00a0c91e6bf6&address=%7B%22streetAddress%22:%22123+Example+Dr.%22,%22city%22:%22Somewhere%22,%22state%22:%22CA%22,%22zip%22:%2299999%2B1234%22%7D
15501550
```
15511551

15521552
Note that the `id` keyword is treated as `text/plain` per the [Encoding Object](#encodingObject)'s default behavior, and is serialized as-is.

0 commit comments

Comments
 (0)