Class JsonSchemaParser
- Namespace
- Solace.SchemaRegistry.Serdes.JsonSchema
- Assembly
- Solace.SchemaRegistry.Serdes.JsonSchema.dll
Parser for JSON Schema that converts raw schema bytes into JsonSchemaModel objects.
public class JsonSchemaParser : ISchemaParser<JsonSchemaModel>
- Inheritance
-
JsonSchemaParser
- Implements
- Inherited Members
Remarks
This class implements the ISchemaParser<S> interface for JSON Schemas, providing functionality to parse raw schema bytes into Schema objects. It handles schema references and supports JSON Schema Draft 7.
Properties
ArtifactType
Gets the artifact type identifier for JSON Schema.
public string ArtifactType { get; }
Property Value
- string
Always returns "JSON" to identify this parser as handling JSON Schema artifacts.
Methods
Parse(byte[], IDictionary<string, byte[]>)
Parses raw schema bytes into a strongly-typed JsonSchemaModel object.
public IParsedSchema<JsonSchemaModel> Parse(byte[] rawSchema, IDictionary<string, byte[]> references)
Parameters
rawSchemabyte[]The raw schema bytes to parse, encoded as UTF-8 JSON
referencesIDictionary<string, byte[]>A dictionary of schema references
Returns
- IParsedSchema<JsonSchemaModel>
An IParsedSchema<S> instance containing the parsed Schema object and raw schema data.
Exceptions
- SerializationException
Thrown when the schema cannot be parsed due to invalid JSON or schema format