def load_validator_params_from_json():
    from json import load
    from os.path import dirname, join
    json_configuration_file = join(dirname(__file__), 'standard_postcode_validator.json')
    with open(json_configuration_file, 'r') as file_handle:
        config_json = load(file_handle)
    StandardPostcodeValidator.AreasWithDistrictZero = config_json['has-district-zero']
    StandardPostcodeValidator.AreasWithoutDistrictTen = config_json['no-district-ten']
    StandardPostcodeValidator.AreasWithOnlyDoubleDigitDistricts = config_json['double-digit-districts']
    StandardPostcodeValidator.AreasWithOnlySingleDigitDistricts = config_json['single-digit-districts']
    StandardPostcodeValidator.SingleDigitAreaSubdistricts = config_json['single-digit-area-subdistricts']
    StandardPostcodeValidator.DoubleDigitAreaSubdistricts = config_json['double-digit-area-subdistricts']
    StandardPostcodeValidator.SecondPositionExcludes = config_json['second-position-excludes']
    StandardPostcodeValidator.FirstPositionExcludes = config_json['first-position-excludes']
    StandardPostcodeValidator.UnitExcludes = config_json['unit-excludes']
    subdivision_map = config_json['subdivided-districts']
    StandardPostcodeValidator.AreasWithSubdistricts = {k: {int(k1): v1 for (k1, v1) in v.items()} for (k, v) in subdivision_map.items()}
def load_validator_params_from_json():
    from json import load
    from os.path import dirname, join
    json_configuration_file = join(dirname(__file__), 'standard_postcode_validator.json')
    with open(json_configuration_file, 'r') as file_handle:
        config_json = load(file_handle)
    StandardPostcodeValidator.AreasWithDistrictZero = config_json['has-district-zero']
    StandardPostcodeValidator.AreasWithoutDistrictTen = config_json['no-district-ten']
    StandardPostcodeValidator.AreasWithOnlyDoubleDigitDistricts = config_json['double-digit-districts']
    StandardPostcodeValidator.AreasWithOnlySingleDigitDistricts = config_json['single-digit-districts']
    StandardPostcodeValidator.SingleDigitAreaSubdistricts = config_json['single-digit-area-subdistricts']
    StandardPostcodeValidator.DoubleDigitAreaSubdistricts = config_json['double-digit-area-subdistricts']
    StandardPostcodeValidator.SecondPositionExcludes = config_json['second-position-excludes']
    StandardPostcodeValidator.FirstPositionExcludes = config_json['first-position-excludes']
    StandardPostcodeValidator.UnitExcludes = config_json['unit-excludes']
    subdivision_map = config_json['subdivided-districts']
    StandardPostcodeValidator.AreasWithSubdistricts = {k: {int(k1): v1 for (k1, v1) in v.items()} for (k, v) in subdivision_map.items()}