json.md
October 8, 2016 ยท View on GitHub
JSON mappers
import * as ez from 'ez-streams'
mapper = ez.mappers.json.parse()
returns a mapper that parses JSON string.
It assumes that the stream has already been split on boundaries that delimit valid JSON strings, with an optional separator at the end.mapper = ez.mappers.json.stringify()
returns a mapper that converts objects to JSON. You can use a thesepoption to specify a separator that will be added at the end of every item. By default,sepis,\n.