<commit_before>if collection.respond_to?(:current_page)
  json.links do
    json.self url_for(page: collection.current_page)
    unless collection.next_page.nil?
      json.next url_for(page: collection.next_page)
    end
    json.last url_for(page: collection.total_pages)
  end
end
<commit_msg>Added json format in jbuilder pagination<commit_after>if collection.respond_to?(:current_page)
  json.links do
    json.self url_for(page: collection.current_page, format: :json)
    unless collection.next_page.nil?
      json.next url_for(page: collection.next_page, format: :json)
    end
    json.last url_for(page: collection.total_pages, format: :json)
  end
end

{'fraction_non_alphanumeric': 0.09487951807228916, 'fraction_numerical': 0.0, 'mean_word_length': 4.541666666666667, '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': '233070', 'n_tokens_mistral': 217, 'n_tokens_neox': 216, 'n_words': 47}