Commits

Nikhil Marathe  committed e897b65

Updated to work with latest node, and the stream event listeners

  • Participants
  • Parent commits 90ca2d8

Comments (0)

Files changed (1)

 // Will be a complete reformatter in javascript similar to the Yajl reformatter
 var sys = require('sys');
-var posix = require('posix');
 var yajl = require('./src/yajl');
 
 function usage() {
 
 var handle = yajl.createHandle();
 handle.addListener( "null", function() {
-    sys.debug("Nullify");
+    sys.debug("null");
 });
 
 handle.addListener( "boolean", function(b) {
 
 var done = false;
 
-process.stdio.open();
-process.stdio.addListener( "data", function( data ) {
-    handle.parse(data);
+stdin = process.openStdin();
+stdin.addListener( "data", function( data ) {
+    handle.parse(data.toString());
 });
-process.stdio.addListener( "close", function() {
+stdin.addListener( "end", function() {
     handle.parseComplete();
 });