Made JSONWrapper.parse more robust.