Skip to content

Commit 5bf56c3

Browse files
handrewshudlow
andauthored
Improve wording around binary and serializedValue
Co-authored-by: Dan Hudlow <[email protected]>
1 parent 41cb8bb commit 5bf56c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/oas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2171,7 +2171,7 @@ Note that `serializedValue`, which MUST be a string, is by necessity a sequence
21712171
This conversion is purely one of encoding. All escaping necessary to reduce the example to the set of characters valid for the target ___location (e.g. URI percent-encoding) MUST be included in the `serializedValue`.
21722172
If the target ___location's encoding is ambiguous, `externalSerializedValue` can be used to demonstrate the exact serialization, including character set encoding, that is intended.
21732173

2174-
While converting from one character encoding to another is well-defined, binary data does not always correspond to valid Unicode strings.
2174+
`serializedValue` can be used for any textual value with a character set encoding which has an unambiguous mapping to Unicode code points. Since Unicode strings have no inherent binary representation, `serializedValue` cannot be used for binary data.
21752175
Per [[!RFC8259]] [Section 8.2](https://www.rfc-editor.org/rfc/rfc8259.html#section-8.2), using escape sequences that cannot encode Unicode characters to represent binary data is not portable and may cause runtime errors.
21762176
Therefore, data formats that are not always representable as Unicode code points SHOULD use `externalSerializedValue`.
21772177

0 commit comments

Comments
 (0)