Fix JSON serialization error in main.py