import Jsonify from 'ex-stream/Json';
Converts stream text data to JSON object
import { createServer } from 'http';
import { json } from 'ex-stream/Json';
createServer((req, res) => {
req
.pipe(json())
.pipe(res);
}).listen(3000, 'localhost');
Parameters:
options
:Object
- Stream options
Creates Json stream instance
new Json()
import { json } from 'ex-stream/Json';
JSON stream factory function
function json()