Only used stripped data for testing if the file is json, but used unstripped when actually parsing. Fixes #6348