Serializes a multilevel python dictionairy