bin/jsonpath in jsonpath-0.5.1 vs bin/jsonpath in jsonpath-0.5.2
- old
+ new
@@ -14,11 +14,9 @@
usage unless ARGV[0]
jsonpath = JsonPath.new(ARGV[0])
case ARGV[1]
when nil #stdin
- until STDIN.eof?
- puts MultiJson.encode(jsonpath.on(MultiJson.decode(STDIN.readline)))
- end
+ puts MultiJson.encode(jsonpath.on(MultiJson.decode(STDIN.read)))
when String
puts MultiJson.encode(jsonpath.on(MultiJson.decode(File.exist?(ARGV[1]) ? File.read(ARGV[1]) : ARGV[1])))
-end
\ No newline at end of file
+end