from typing import List

from analogai.deepthink.presentation.parsers.parsed_sentence import ParsedSentence
from analogai.deepthink.presentation.parsers.pipeline.message_parsing_pipeline import (
    MessageParsingPipeline,
)
from analogai.deepthink.presentation.parsers.utils.json_format_validator import JsonFormatValidator


def parse_json(json_str: str) -> List[ParsedSentence]:
    return MessageParsingPipeline().parse(json_str)


def is_json_format(text: str) -> bool:
    return JsonFormatValidator().is_json_like(text)
