import json

from parallels.core.utils.common import read_file_contents
from parallels.plesk.hosting_description.input_formats.base import InputFormat


class InputFormatJSON(InputFormat):
    @property
    def name(self):
        return 'json'

    def read(self, filename):
        return json.loads(read_file_contents(filename))
