here.platform.schema.json_parser module#

HERE Platform Json Parser module

class here.platform.schema.json_parser.JsonParser(schema_pkg_file: str | Path | BytesIO)[source]#

Bases: Parser

A class for parsing Json data of a catalog layer partition.

extract_json_schema() dict[source]#

Extract layer info from an input zipfile, locate the main message source and initialize the json-schema object.

Returns:

json-schema object

parse_message(message: bytes) Message | dict[source]#

Parse a message and returns the corresponding partition class instance.

Parameters:

message – message received as blob

Returns:

parsed message

serialize_bytes(data: Message | dict) bytes[source]#

Parse a Json message and returns the bytes.

Parameters:

data – Json message

Returns:

bytes

validate_json_schema(data: dict)[source]#

Validates the given json instance against the defined schema.

Parameters:

data – json instance to be validated