added experimental JSON-based approach
made test case harder
updated with test
got \r\n case working hopefully
canonicalize line endings
ugh
erge remote-tracking branch 'upstream/master'