""" Объединение файлов json в общую базу метаданных. """

import json

paths = ('../devel_program.pdf.json',
         '../enroll_rules.pdf.json',
         '../RegulationsOnEducationActivity.pdf.json')

merged_path = 'sign.json'

merged_dict = {}

for path in paths:
    with open(path, 'r', encoding='utf-8') as jsonfile:
        d = json.load(jsonfile)
    merged_dict.update(d)

with open(merged_path, 'w', encoding='utf-8') as jsonfile:
    json.dump(merged_dict, jsonfile, ensure_ascii=False, indent=4)
        
