README.md in fast_jsonparser-0.3.0 vs README.md in fast_jsonparser-0.4.0

- old
+ new

@@ -105,15 +105,28 @@ > FastJsonparser.load_many(file_path) { |obj| p obj[:time]} "17/May/2015:08:05:32 +0000" "17/May/2015:08:05:23 +0000" "17/May/2015:08:05:24 +0000" ``` +If size of json batch is greater than 1 MB then use `batch_size` option +``` +FastJsonparser.load_many(f.path, batch_size: 2_000) {} +``` -4. Raise FastJsonparser::ParseError when invalid JSON provided for parsing +4. Accept optional param :symbolize_keys (default symbolize_keys: true) +If string key is expected in parsed result then use + ``` +FastJsonparser.parse('{"one": 1, "two": 2}', symbolize_keys: false) + +``` + +5. Raise FastJsonparser::ParseError when invalid JSON provided for parsing + +``` FastJsonparser.parse("123: 1") # FastJsonparser::ParseError (parse error) ``` ### Example @@ -122,12 +135,12 @@ > FastJsonparser.parse(sample_json) => {:a=>"Alpha", :b=>true, :c=>12345, :d=>[true, [false, [-123456789, nil], 3.9676, ["Something else.", false], nil]], :e=>{:zero=>nil, :one=>1, :two=>2, :three=>[3], :four=>[0, 1, 2, 3, 4]}, :f=>nil, :h=>{:a=>{:b=>{:c=>{:d=>{:e=>{:f=>{:g=>nil}}}}}}}, :i=>[[[[[[[nil]]]]]]]} ``` ## Development -After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. +After checking out the repo, run `rake compile` to install dependencies. Then, run `rake test` to run the tests. -To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). +For more option, refer https://github.com/rake-compiler/rake-compiler ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/anilmaurya/fast_jsonparser. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.