(self, config_dict)
return json.dumps(config_dict)
Serialize a graph config dictionary as JSON.

        Due to networkx's use of numpy.ndarray to describe
        coordinates JSON is unable to serialize the dictionary.
        It is therefore needed to convert the ndarray into lists
        so that they can be serialized by JSON.

        Args:
            config_dict (dict): the graph config dictionary.

        Returns:
            A JSON serialized string with the dictionary's content.
Serialize a graph config dictionary as JSON.
Serialize a graph config dictionary as JSON .
def _serialize(self, config_dict):
        """Serialize a graph config dictionary as JSON.

        Due to networkx's use of numpy.ndarray to describe
        coordinates JSON is unable to serialize the dictionary.
        It is therefore needed to convert the ndarray into lists
        so that they can be serialized by JSON.

        Args:
            config_dict (dict): the graph config dictionary.

        Returns:
            A JSON serialized string with the dictionary's content.
        """
        for key, item in config_dict.get('layout', {}).items():
            if not isinstance(item, numpy.ndarray):
                continue
            config_dict['layout'][key] = list(item)

        return json.dumps(config_dict)
def _serialize ( self , config_dict ) : for key , item in config_dict . get ( 'layout' , { } ) . items ( ) : if not isinstance ( item , numpy . ndarray ) : continue config_dict [ 'layout' ] [ key ] = list ( item ) return json . dumps ( config_dict )