def __flatten_bookmarks(bookmarks):

    """
    Converts a list of nested dicts (with children) from json file
    to a flattened, sequential list of all children dicts. Adds only those children
    of type 'text/x-moz-place' and ignores those of type 'text/x-moz-separator'.

    :param bookmarks:   List of nested dicts, e.g. [ { 'title':'rootFolder', children': [{},{},..] }, { }]
                        (json text)
    :return:            List of bookmarks dicts,
                        e.g. [{'type':'text/x-moz-place', 'uri':'abc', },{'type':'text/x-moz-place', 'uri':'def',},..]
    """

    result = []
    if bookmarks is not None:
        for bookmark in bookmarks:
            if bookmark.get("type") == "text/x-moz-place-container":
                children_bookmarks = __flatten_bookmarks(bookmark.get("children"))
                for child in children_bookmarks:
                    result.append(child)
            else:
                if bookmark.get("type") == 'text/x-moz-place':
                    result.append(bookmark)

    return result