Only used stripped data for testing if the file is json, but used unstripped when actually parsing. Fixes #6348
Merge pull request #6377 from sivel/issue/6348

Don't lstrip data to be parsed by parse_yaml. Fixes #6384