Recursively sets values of some (all) object and its subobjects properties.

        The object can be a user defined object, map or array.
        Property values correspondently are object properties, map key-pairs or array elements with their indexes.

        If some properties do not exist or introspection fails they are just silently skipped and no errors thrown.

        :param obj: an object to write properties to.

        :param values: a map, containing property names and their values.

def set_properties(obj, values):
        """
        Recursively sets values of some (all) object and its subobjects properties.

        The object can be a user defined object, map or array.
        Property values correspondently are object properties, map key-pairs or array elements with their indexes.

        If some properties do not exist or introspection fails they are just silently skipped and no errors thrown.

        :param obj: an object to write properties to.

        :param values: a map, containing property names and their values.
        """
        if values == None or len(values) == 0:
            return
        
        for (key, value) in values.items():
            RecursiveObjectWriter.set_property(obj, key, value)