Fix spurious exceptions in json processing