making the json serializer more forgiving