toJsonLd

suspend fun VerifiableCredential.toJsonLd(): JsonObject

Convert credential to JSON-LD format.

Returns the credential as a JSON-LD object (JsonObject).

Example:

val jsonLd = credential.toJsonLd()
println("JSON-LD: ${jsonLd.toString()}")

Return

JSON-LD object