Avoid out-of-range errors when parsing JSON keywords.