"The food tastes of oninon." is absolutely right. I think.

but how about "The food tastes of sweetness. ?

Is it right? Is it awkward?