updating json serialization for dictionaries