JsonSchema.Parser.ParserResult (json_schema v0.6.0)

Copy Markdown View Source

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

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.

Types

t()

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

Functions

merge(parser_result1, parser_result2)

@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.

new()

@spec new() :: t()

Returns an empty ParserResult.

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

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.