# Found unmapped fields during JSON-LD normalization

**URL:** <https://community.blockcerts.org/t/found-unmapped-fields-during-json-ld-normalization/2405>\
**Category:** Technical\
**Created:** [March 13, 2020, 1:58pm UTC](https://community.blockcerts.org/t/found-unmapped-fields-during-json-ld-normalization/2405 "2020-03-13T13:58:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dekts](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@dekts](https://community.blockcerts.org/u/dekts)\
**Post date:** [March 13, 2020, 1:58pm UTC](https://community.blockcerts.org/t/found-unmapped-fields-during-json-ld-normalization/2405/1 "2020-03-13T13:58:41Z")

</div>

I’m getting the error while I’m going to verify it from web browser ([https://www.blockcerts.org/](https://www.blockcerts.org/))

I have added the additional fields in the manner of below example:

`additional_per_recipient_fields = {"fields": [{"path": "$.evidence","value": "*|EVIDENCE|*","csv_column": "evidence"}]}`

In above json I have added multiple fields and yes if the title is more then one word then I used it as:

`additional_per_recipient_fields = {"fields": [{"path": "$.evidence_title","value": "*|EVIDENCE_TITLE|*","csv_column": "evidence_title"}]}`

Now can you please help me why I’m getting the error called:

 ![Screenshot from 2020-03-13 19-26-47](https://us1.discourse-cdn.com/flex016/uploads/blockcerts/original/1X/80a2a843c2fad93f742660ba95761dec02d69cfc.png)

---

<div class="post-metadata">

**Author:** ![lemoustachiste](https://avatars.discourse-cdn.com/v4/letter/l/7c8e57/32.png) [@lemoustachiste](https://community.blockcerts.org/u/lemoustachiste)\
**Post date:** [March 18, 2020, 8:24pm UTC](https://community.blockcerts.org/t/found-unmapped-fields-during-json-ld-normalization/2405/2 "2020-03-18T20:24:41Z")

</div>

Hi @dekts,

JSONLD normalization is a process where the document is parsed against a context definition.  
It’s being thrown here: [https://github.com/blockchain-certificates/cert-verifier-js/blob/master/src/inspectors/computeLocalHash.js#L88](https://github.com/blockchain-certificates/cert-verifier-js/blob/master/src/inspectors/computeLocalHash.js#L88)

Basically what this is telling you is that you are using fields that are not defined by the `@context` key of your certificate.  
You could try and define the keys that you are adding in your document in the same fashion as what Learning Machine does:

```auto
"@context": [
    "https://w3id.org/openbadges/v2",
    "https://w3id.org/blockcerts/v2",
    {
      "metadataJson": {
        "@id": "https://schemas.learningmachine.com/2017/blockcerts/metadata",
        "@type": "https://schemas.learningmachine.com/2017/types/text/json"
      },
      "displayHtml": {
        "@id": "https://schemas.learningmachine.com/2017/blockcerts/displayHtml",
        "@type": "https://schemas.learningmachine.com/2017/types/text/html"
      },
      "nonce": {
        "@id": "https://schemas.learningmachine.com/2017/blockcerts/nonce",
        "@type": "https://schema.org/Text"
      },
      "universalIdentifier": {
        "@id": "https://schemas.learningmachine.com/2017/blockcerts/identifier",
        "@type": "https://schema.org/Text"
      }
    }
  
]

```

I believe this should fix the issue for you

---

<div class="post-metadata">

**Author:** ![dekts](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@dekts](https://community.blockcerts.org/u/dekts)\
**Post date:** [March 19, 2020, 4:52am UTC](https://community.blockcerts.org/t/found-unmapped-fields-during-json-ld-normalization/2405/3 "2020-03-19T04:52:09Z")

</div>

Yes correct @lemoustachiste  
I have defined the parameters in the `additional_global_fields`

Here is the example how I have added the parameteres which is added in the `additional_per_recipient_fields`

```auto
  "fields": [
    {
      "path": "$.@context",
      "value": [
        "https://w3id.org/openbadges/v2",
        "https://w3id.org/blockcerts/v2",
        {
          "displayHtml": {
            "@id": "schema:description"
          },
          "xyz_name": {
            "@id": "schema:description"
          },
          "abc_logo": {
            "@id": "schema:description"
          }
        }
      ]
    }
  ]
}

```

Many thanks @lemoustachiste

Cheers!

---

<div class="post-metadata">

**Author:** ![sreenumalae](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/sreenumalae/32/773_2.png) [@sreenumalae](https://community.blockcerts.org/u/sreenumalae)\
**Post date:** [October 26, 2022, 11:10am UTC](https://community.blockcerts.org/t/found-unmapped-fields-during-json-ld-normalization/2405/4 "2022-10-26T11:10:12Z")

</div>

@lemoustachiste @dekts

I’m using the default values and still facing the same issue

 ![Screenshot 2022-10-26 at 3.08.59 PM](https://us1.discourse-cdn.com/flex016/uploads/blockcerts/original/1X/40a45c25a99709f053064178252540675a1836ce.png)

---

<div class="post-metadata">

**Author:** ![lemoustachiste](https://avatars.discourse-cdn.com/v4/letter/l/7c8e57/32.png) [@lemoustachiste](https://community.blockcerts.org/u/lemoustachiste)\
**Post date:** [October 26, 2022, 1:03pm UTC](https://community.blockcerts.org/t/found-unmapped-fields-during-json-ld-normalization/2405/5 "2022-10-26T13:03:46Z")

</div>

The root cause of this is because you have a key in the document that is not pre-declared in the `@context` object.

JSONLD normalization in that case does not understand what to do with that word, and Blockcerts does not hash it out in the final output.

To circumvent the error, you’ll need to define the the `alumniOf` as part of your context, either inline as the example in [Found unmapped fields during JSON-LD normalization - #2 by lemoustachiste](https://community.blockcerts.org/t/found-unmapped-fields-during-json-ld-normalization/2405/2), or bringing in another context which defines the key word.

Watch out though, using this context: [https://www.w3.org/2018/credentials/examples/v1](https://www.w3.org/2018/credentials/examples/v1) has proven to break other parts of blockcerts hashing, so I would advise against using it.
