Use json. Don't reinvent the wheel.