def METHOD_NAME(self, metadata):
    """Create the dictionary that we will convert to JSON text"""
    cbi = dict()
    cbi_container = {'appID': 'ComicTagger/' + '1.0.0',  # ctversion.version,
                     'lastModified': str(datetime.now()),
                     'ComicBookInfo/1.0': cbi}
    # helper func
    def assign(cbi_entry, md_entry):
        if md_entry is not None:
            cbi[cbi_entry] = md_entry
    # helper func
    def toInt(s):
        i = None
        if type(s) in [str, str, int]:
            try:
                i = int(s)
            except ValueError:
                pass
        return i
    assign('series', metadata.series)
    assign('title', metadata.title)
    assign('issue', metadata.issue)
    assign('publisher', metadata.publisher)
    assign('publicationMonth', toInt(metadata.month))
    assign('publicationYear', toInt(metadata.year))
    assign('numberOfIssues', toInt(metadata.issueCount))
    assign('comments', metadata.comments)
    assign('genre', metadata.genre)
    assign('volume', toInt(metadata.volume))
    assign('numberOfVolumes', toInt(metadata.volumeCount))
    assign('language', utils.getLanguageFromISO(metadata.language))
    assign('country', metadata.country)
    assign('rating', metadata.criticalRating)
    assign('credits', metadata.credits)
    assign('tags', metadata.tags)
    return cbi_container