Serialize tag in proper JSON format