subject
Sleek builder DSL for creating CredentialSubject with infix to syntax.
Examples:
// Simple subject with properties
val subject = subject {
"name" to "John Doe"
"email" to "john@example.com"
"age" to 30
}
// Subject with DID
val subject = subject(did) {
"name" to "John Doe"
"degree" to buildJsonObject {
"type" to "BachelorDegree"
"name" to "Bachelor of Science"
}
}
// Nested objects
val subject = subject {
"address" to buildJsonObject {
"street" to "123 Main St"
"city" to "New York"
}
}Content copied to clipboard
Create subject from DID.
Create subject from IRI string.