Several changes to visitors for JSON serializer