Serialize electric fields + add test of conversion and serialization

[#52998997]