fn collect_json(path: &Path, krate: &str) -> Result<(Vec<String>, Vec<String>)>
Expand description

Read a file and return all lines that match the “{crate}”:{data},\ format, and return a tuple (Vec<DataString>, Vec<CrateNameString>).

This forms the payload of files that look like this:

var data = JSON.parse('{\
"{crate1}":{data},\
"{crate2}":{data}\
}');
use_data(data);

The file needs to be formatted so that only crate data lines start with ".