json

package
v2.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: Apache-2.0, MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
}

Parser can parse claim data according to specification

func (Parser) GetFieldSlotIndex

func (s Parser) GetFieldSlotIndex(field string, typeName string,
	schemaBytes []byte) (int, error)

GetFieldSlotIndex return index of slot from 0 to 7 (each claim has by default 8 slots)

func (Parser) ParseClaim

func (s Parser) ParseClaim(ctx context.Context,
	credential verifiable.W3CCredential,
	opts *processor.CoreClaimOptions) (*core.Claim, error)

ParseClaim creates Claim object from W3CCredential Deprecated: use credential.ToCoreClaim instead

type Validator

type Validator struct {
}

Validator validate json data

func (Validator) ValidateData

func (v Validator) ValidateData(data, schema []byte) error

ValidateData validate JSON data by JSON Schema

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL