lstrip values before checking for json values

Fixes #136.