toJsonObject

fun toJsonObject(document: DidDocument, useV1_1Context: Boolean = true): JsonObject

Produces a JSON object for the DID document.

Return

JsonObject suitable for HTTP body or embedding

Parameters

document

The DID document

useV1_1Context

If true, use DID_1_1_CONTEXT as first @context entry (DID 1.1 §6.2.3); otherwise use document's context or v1