Skip to content

Instantly share code, notes, and snippets.

@tannie
tannie / json-split.rb
Last active March 22, 2022 17:16 — forked from matt-west/json-split.rb
Ruby script to split a JSON file
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
puts "Opening File"
file = File.open(ARGV[0])
puts "Fetching Contents"
bytes_re = /((?:\\\\)+|[^\\])(?:\\u[0-9a-f]{4})+/