ADPC icon indicating copy to clipboard operation
ADPC copied to clipboard

The JSON list does not allow for an extension of the format

Open robrwo opened this issue 4 years ago • 2 comments

Using a JSON list does not allow for the format to be extended. Consider using a JSON object (a.k.a. hash or associative array) instead, since it allows useful metadata, something like:

{
  'version': 1.0,
  'privacy_policy' => 'https://www.example.com/privacy.html',
  'contact'            => 'https://www.example.com/contact.html',
  'consentRequests': [
  {
    "id": "q1analytics",
    "text": "We track and analyse your visit(s) on this website, for improving our product; this places a cookie on your device to recognise you on subsequent page visits."
   },
   ...
  ]
}

Notice the above example has a version. as well as links to a privacy policy and contact page.

robrwo avatar Jun 18 '21 08:06 robrwo

This is addressed (sort-of) within the spec as a note in Section 6.1 as -

Future versions of this specification may define other members, to provide relevant information in a structured, machine-readable way.

And through an example in Section 7.1

{
  "consentRequests": [
    {
      "id": "q1analytics",
      "text": "We track and analyse your visit(s) on this website, for improving our product; this places a cookie on your device to recognise you on subsequent page visits."
    },
    {
      "id": "q2recommendation",
      "text": "We observe your interaction with our content to personalise your experience by recommending content you may find of interest."
    },
  ]
}

So to maintain consistency, the term should be consentRequests, and the format should be:

{
  "consentRequests":  [ 
    {
      "id": "A",
      "text": "xyz"
    }
  ]
}

coolharsh55 avatar Jun 18 '21 11:06 coolharsh55

Using a JSON list does not allow for the format to be extended. Consider using a JSON object (a.k.a. hash or associative array) instead

Not sure if I misunderstand your question. The JSON file is indeed specified to be an object, not a list. See https://www.dataprotectioncontrol.org/spec/#dfn-consent-requests-resource

gb-noyb avatar Jul 08 '21 10:07 gb-noyb