<commit_before>require 'multi_json'

module Deferrer
  module JsonEncoding

    class DecodeException < StandardError; end

    def encode(item)
      MultiJson.dump(item)
    end

    def decode(item)
      begin
        MultiJson.load(item)
      rescue ::MultiJson::DecodeError => e
        raise DecodeException, e.message, e.backtrace
      end
    end
  end
end<commit_msg>Remove DecodeException<commit_after>require 'multi_json'

module Deferrer
  module JsonEncoding

    def encode(item)
      MultiJson.dump(item)
    end

    def decode(item)
      MultiJson.load(item)
    end
  end
end
{'fraction_non_alphanumeric': 0.07023411371237458, 'fraction_numerical': 0.0, 'mean_word_length': 2.83974358974359, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '1182845', 'n_tokens_mistral': 188, 'n_tokens_neox': 183, 'n_words': 45}