Fix erroneus check against end which was preventing non-null terminated JSON strings from being parsed correctly