murex icon indicating copy to clipboard operation
murex copied to clipboard

`jsonl` ReadArray() doesn't support concatenated JSON

Open lmorg opened this issue 5 years ago • 0 comments

The code currently looks like:

func readArray(read stdio.Io, callback func([]byte)) error {
	scanner := bufio.NewScanner(read)
	for scanner.Scan() {
		callback(bytes.TrimSpace(scanner.Bytes()))
	}

	return scanner.Err()
}

The problem there is this doesn't support concatenated JSON which marshal() (partially) does.

This will need to be rewritten with a primitive JSON parser

lmorg avatar Jan 27 '20 21:01 lmorg