Decode utf-8 json metadata before saving it to storage

Tentative fix for #234