import json


def validate_json_string(text):
    """ Validates a json string, if false, returns error message """
    try:
        data = json.loads(text)
    except ValueError as val_err:
        return (False, {'msg' : str(val_err)})
    except TypeError as type_err:
        return (False, {'msg' : str(type_err)})
    return (True, data)