Home VocabularyRegistry Class
VocabularyRegistry Class
Cancel

VocabularyRegistry Class

Namespace: Json.Schema

Inheritance: VocabularyRegistry 🡒 object

Provides a registry for managing JSON Schema vocabularies, allowing registration and unregistration of custom vocabularies in addition to well-known official vocabularies.

Remarks

The registry maintains a set of official vocabularies that cannot be modified or removed. Use the Json.Schema.VocabularyRegistry.Global property to access a shared, application-wide registry instance. Getting vocabularies via

Properties

NameTypeSummary
GlobalVocabularyRegistryGets the global registry of vocabularies available throughout the application.

Methods

Register(Vocabulary vocabulary)

Registers a custom vocabulary for use within the system.

Declaration

1
public void Register(Vocabulary vocabulary)
ParameterTypeDescription
vocabularyVocabularyThe vocabulary to register. The vocabulary’s identifier must not conflict with any official vocabularies.

Remarks

Registering a vocabulary allows it to be referenced and used in subsequent operations. Official

Unregister(Uri vocabularyId)

Removes the vocabulary identified by the specified URI from the registry.

Declaration

1
public void Unregister(Uri vocabularyId)
ParameterTypeDescription
vocabularyIdUriThe URI that uniquely identifies the vocabulary to remove. Cannot be an official vocabulary.
Contents