Skip to content

Configure resolver response type

Use this guide to change the resolver response format between JSON-LD and plain JSON. Adjust the setting to match the expectations of downstream applications that consume DID documents.

Before you begin:

Step 1: Review the current response format

Section titled “Step 1: Review the current response format”
  1. Open Resolvers in the dashboard and select your instance.
  2. Go to the Test tab.
  3. Enter a DID to resolve, such as did:key:z82LkvjLm5cfkWTvkm3RwyWNKb5awAXKRFZUDGjUhaXRAPE1Yx667dVszpiJTXMQsHRuZHN.
  4. Select Test and examine the response body and headers.
  5. Note the displayed format and the Content-Type header (defaults to application/did+ld+json).
  1. Go back to the Configuration tab for the resolver instance.
  2. Locate Response settings.
  3. Set Content type to application/did+json.
  4. Select Save to apply the change.

The resolver now omits the JSON-LD @context field and serves standard JSON DID documents.

  1. Return to the Test tab.
  2. Resolve the same DID used earlier.
  3. Confirm the response body is valid JSON without the JSON-LD context.
  4. Verify the Content-Type header shows application/did+json.
  1. Open Configuration again.
  2. Change Content type back to application/did+ld+json.
  3. Select Save.
  4. Run the test once more to ensure the response includes the JSON-LD context and the header shows application/did+ld+json.