Skip to content

Rename util module to parsers #18

@jasonwalsh

Description

@jasonwalsh

Currently, the aptos.util module contains a class Parser with a static method parse to parse JSON formatted specifications.

Ideally, the Parser class should serve more as an interface for concrete parser classes to implement. Therefore, the Parser.parse method should raise a NotImplementedError.

class Parser:
    """Parser interface"""

    @staticmethod
    def parse(instance):
        raise NotImplementedError()


class JSONSchemaParser(Parser):

    @staticmethod
    def parse(instance):
        # Algorithm for parsing JSON schema documents

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions