@classmethod
def from_json(cls, client, project_id, json_obj, download_translations=True,
    download_sources=False):
    """Deserialize the file JSON to File object.

        :param client: an object instance of TextUnitedClient
        :type client: TextUnitedClient
        :param project_id: The project id of the file
        :param json_obj: the File json object
        :param download_translations: a boolean to select to download the
        translated file content. Only if the file status is Translated.
        :param download_sources: a boolean to select to download the source
        file content.
        :type download_translations: bool
        :type download_sources: bool
        :return: a File object with the attributes of the JSON object
        :rtype: File object
        """
    obj = cls(client=client, project_id=project_id, id_=json_obj['FileId'],
        name=json_obj['Filename'], subdir=json_obj['Subdir'], size=json_obj
        ['FileSize'], words=json_obj['Words'], status=json_obj['Status'])
    if download_translations and obj.status == 'Translated':
        obj.get_translated_content()
    if download_sources:
        obj.get_source_content()
    return obj
