ndjson / ndjson.rb

ndjson parser and generator for ruby

Home Page:https://rubygems.org/gems/ndjson

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ndjson.rb

Simple ndjson parser gem.

The Parser as well as the Generator take IO Objects or Strings. Strings are opened with the open-uri gem.

Note that this is written by a Ruby noob and looking for actual Ruby dev collaborators.

Usage

NDJSON::Parser

require 'ndjson'

parser = NDJSON::Parser.new( $stdin )
parser.each { |l| puts l }

NDJSON::Generator

generator = NDJSON::Generator.new( 'test.file' )

generator.write({:hello => "world"})
generator.write({:noob => "what"})

Resources

About

ndjson parser and generator for ruby

https://rubygems.org/gems/ndjson


Languages

Language:Ruby 100.0%