Project

ndjson

0.02
No release in over 3 years
Low commit activity in last 3 years
A simple NDJSON parser and generator
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

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