this function seems overly complicated, as it's still dealing with multiple lines,  but in JSON it seems like we can just assume 1 request == 1 line, no?