Skip to content

Commit

Permalink
Add an example for usnat
Browse files Browse the repository at this point in the history
  • Loading branch information
hrlyg committed Nov 5, 2024
1 parent 33255a2 commit 1052c8b
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions Core/CMP API Specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,9 @@ enumerated [here](https://github.com/InteractiveAdvertisingBureau/Global-Privacy
to the section's JS representation according to its spec. Each section's is represented as an array of objects, and each
object corresponds to a sub-section (segment) in that section. Follow this [table of data type mapping](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Core/Consent%20String%20Specification.md#section-encoding)
to map each spec's GPP field types to JavaScript native data
types. For example:
```
types. Examples:
```javascript
/* Example of a `parsedSections` that holds two sections: tcfcav1, tcfeuv2 */
{
/* GPPExtension: IAB Canada TCF.md. */
tcfcav1: [
Expand All @@ -230,7 +231,7 @@ types. For example:
ConsentScreen: 5,
...
},
/* Publisher Purposes Sub-section (optional) */
/* Publisher Purposes Sub-section */
{
SubsectionType: 3,
PubPurposesExpressConsent: [1,2,3,4,5],
Expand All @@ -252,16 +253,36 @@ types. For example:
VendorConsent: [1,2,4,6],
...
},
/* Disclosed Vendors Segment (optional) */
/* Disclosed Vendors Segment */
{
SegmentType: 1,
...
},
/* Publisher Purposes Segment (optional) */
/* Publisher Purposes Segment */
{
SegmentType: 3,
...
}
],
```
```javascript
/* Example of a `parsedSections` that holds one section: usnat */
{
/* IAB Privacy's Multi-State Privacy Agreement (MSPA) US National Technical Specification.md */
usnat: [
/* Core Segment */
{
Version: 1,
SharingNotice: 1,
KnownChildSensitiveDataConsents: [0, 0],
MspaCoveredTransaction: 2,
...
},
/* GPC Sub-section */
{
SubsectionType: 1,
Gpc: true,
},
]
}
```
Expand Down

0 comments on commit 1052c8b

Please sign in to comment.