ParseError

object ParseError
Companion:
class
trait Sum
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

case object InvalidData extends ParseError

The data payload's structure appears to be invalid.

The data payload's structure appears to be invalid.

A valid structure is one that has the following fields:

  • 'schema': a string containing a valid Iglu schema URI;
  • 'data': a JSON blob containing the actual data.

It's likely one or both of these fields is missing or malformed.

case object InvalidIgluUri extends ParseError

The Iglu URI appears to be invalid.

The Iglu URI appears to be invalid.

A valid Iglu schema URI looks something like this: "iglu:com.vendor/schema_name/jsonschema/1-0-0".

It must match the following regex:

"^iglu:([a-zA-Z0-9-_.]+)/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)/([0-9]*(?:-(?:[0-9]*)){2})$"

.

This regex allows for invalid schema versions. If the schema version is invalid, it will be reported in a separate InvalidSchemaVer error.

"^iglu:([a-zA-Z0-9-_.]+)/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)/([0-9](?:-(?:[0-9])){2})$" }}}

This regex allows for invalid schema versions. If the schema version is invalid, it will be reported in a separate InvalidSchemaVer error.

case object InvalidMetaschema extends ParseError

The metaschema URI appears to be invalid.

The metaschema URI appears to be invalid.

A valid Iglu schema must make use of the $schema keyword to declare that it conforms to the 'com.snowplowanalytics.self-desc/schema' metaschema.

The valid format is:

"$schema" : "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#"

.

It's likely this declaration is missing or malformed.

"$schema" : "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#" }}}

It's likely this declaration is missing or malformed.

case object InvalidSchema extends ParseError

The schema appears to not be a valid self-describing schema.

The schema appears to not be a valid self-describing schema.

A valid self-describing schema must contain a 'self' property with information that describes the schema, eg:

 "self": {
    "vendor": "com.vendor",
    "name": "schema_name",
    "format": "jsonschema",
    "version": "1-0-0"
  }

It's likely this property is missing or malformed.

case object InvalidSchemaVer extends ParseError

The schema version appears to be invalid.

The schema version appears to be invalid.

A valid schema version consists of MODEL, REVISION and ADDITION, separated by dashes, eg 1-0-0.

Partial versions are allowed, which only specify the MODEL and / or REVISION, eg 1-?-? or 1-0-?.

Zeroes cannot be prepended to any component, so this is not allowed: 01-01-01.

A full schema version must match the following regex:

"^([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$"

.

A partial schema version must match the following regex:

"^([1-9][0-9]*|\\?)-((?:0|[1-9][0-9]*)|\\?)-((?:0|[1-9][0-9]*)|\\?)$"

.

"^([1-9][0-9]|\?)-((?:0|[1-9][0-9])|\?)-((?:0|[1-9][0-9]*)|\?)$" }}}

"^([1-9][0-9])-(0|[1-9][0-9])-(0|[1-9][0-9]*)$" }}}

A partial schema version must match the following regex:

"^([1-9][0-9]*|\\?)-((?:0|[1-9][0-9]*)|\\?)-((?:0|[1-9][0-9]*)|\\?)$"

.

"^([1-9][0-9]|\?)-((?:0|[1-9][0-9])|\?)-((?:0|[1-9][0-9]*)|\?)$" }}}

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Concrete methods

def liftParse[A, B](parser: A => Either[ParseError, B]): A => Either[(ParseError, A), B]

Add an input that failed parsing to the error.

Add an input that failed parsing to the error.

def parse(string: String): Option[ParseError]