View Source JsonSchema.Parser.ParserResult (json_schema v0.4.0)

Represents the result of parsing a subset of a JSON schema including parsed types, warnings, and errors.

Link to this section Summary

Functions

Merges two ParserResults and adds any collisions errors from merging their type dictionaries to the list of errors in the merged ParserResult.

Returns an empty ParserResult.

Creates a ParserResult from a type dictionary.

Link to this section Types

@type t() :: %JsonSchema.Parser.ParserResult{
  errors: [JsonSchema.Parser.ParserError.t()],
  type_dict: JsonSchema.Types.typeDictionary(),
  warnings: [JsonSchema.Parser.ParserWarning.t()]
}

Link to this section Functions

Link to this function

merge(parser_result1, parser_result2)

View Source
@spec merge(t(), t()) :: t()

Merges two ParserResults and adds any collisions errors from merging their type dictionaries to the list of errors in the merged ParserResult.

@spec new() :: t()

Returns an empty ParserResult.

Link to this function

new(type_dict, warnings \\ [], errors \\ [])

View Source

Creates a ParserResult from a type dictionary.

A ParserResult consists of a type dictionary corresponding to the succesfully parsed part of a JSON schema object, and a list of warnings and errors encountered while parsing.