Skip to content

Commit 7cdb2f1

Browse files
BBrandl948SSwiniarskiyangc95
authored
Added conforming datatypes & copatibility info (#3293)
* Added conforming datatypes & copatibility info * made requested changes after review * resolved markdown issues & made suggested changes * Update content/swift/concepts/protocols/terms/encodable/encodable.md made changes on title Co-authored-by: SSwiniarski <[email protected]> * Update content/swift/concepts/protocols/terms/encodable/encodable.md corrected type mismatch on line 7 Co-authored-by: SSwiniarski <[email protected]> * Update content/swift/concepts/protocols/terms/encodable/encodable.md combined two Notes to have only one Note entry Co-authored-by: SSwiniarski <[email protected]> * Update encodable.md * Update content/swift/concepts/protocols/terms/encodable/encodable.md Co-authored-by: Christine Yang <[email protected]> * Update encodable.md Added description to specified protocols * Update encodable.md --------- Co-authored-by: SSwiniarski <[email protected]> Co-authored-by: Christine Yang <[email protected]>
1 parent d120c13 commit 7cdb2f1

File tree

1 file changed

+8
-2
lines changed
  • content/swift/concepts/protocols/terms/encodable

1 file changed

+8
-2
lines changed

content/swift/concepts/protocols/terms/encodable/encodable.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@ CatalogContent:
1212
- 'paths/build-ios-apps-with-swiftui'
1313
---
1414

15-
**`Encodable`** is a protocol that enables a type's data to be encoded for use with Application Programming Interfaces ([APIs](https://www.codecademy.com/resources/docs/general/api)).
15+
**`Encodable`** is a protocol that enables a type's data to be encoded and for use with Application Programming Interfaces ([APIs](https://www.codecademy.com/resources/docs/general/api)). If data also needs to be decoded, it's convenient to use the `Codable` protocol because it includes both the `Encodable` and `Decodable` protocols.
1616

17-
> **Note:** If data also needs to be decoded, it's convenient to use the `Codable` protocol because it includes both the `Encodable` and `Decodable` protocols.
17+
The protocol is related to the following protocols:
18+
19+
- `Codeable` includes both `Decodeable` and `Encodeable`
20+
- [`Decodeable`](https://www.codecademy.com/resources/docs/swift/protocols/decodable)
21+
- `CodingKey`
22+
- `CodingKeyRepresentable`
23+
- [CodingUserInfoKey](https://www.codecademy.com/resources/docs/swift/protocols/codingkeyrepresentable)
1824

1925
## Syntax
2026

0 commit comments

Comments
 (0)