<commit_before>import json
import sys

from whitefacesdk.constants import COLUMNS, MAX_FIELD_SIZE


class JSON(object):

    def __init__(self, data, cols=COLUMNS, max_field_size=MAX_FIELD_SIZE):
        cols += [u'firsttime', u'created_at', u'otype', u'lasttime', u'id']
        self.cols = cols
        self.max_field_size = max_field_size
        self.data = data

    def write(self, fh=sys.stdout):        
        fh.write(json.dumps(self.data['feed']))
        fh.write("\n")<commit_msg>update format json module, update otype to itype, similar to issue #53<commit_after>import json
import sys

from whitefacesdk.constants import COLUMNS, MAX_FIELD_SIZE


class JSON(object):

    def __init__(self, data, cols=COLUMNS, max_field_size=MAX_FIELD_SIZE):
        cols += [u'firsttime', u'created_at', u'itype', u'lasttime', u'id']
        self.cols = cols
        self.max_field_size = max_field_size
        self.data = data

    def write(self, fh=sys.stdout):        
        fh.write(json.dumps(self.data['feed']))
        fh.write("\n")
{'fraction_non_alphanumeric': 0.12344497607655502, 'fraction_numerical': 0.0019138755980861245, 'mean_word_length': 3.322314049586777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3292379', 'n_tokens_mistral': 363, 'n_tokens_neox': 351, 'n_words': 76}