import json


def json_from_string_if_possible(value: str):
    """ If your string is json then it will be parsed and returned otherwise you just get your string back """
    try:
        return json.loads(value) if len(value) > 4 else value
    except Exception:
        pass
    return value