code: def export_net_json(net, net_type, indent='no-indent'):
    ''' export json string of dat '''
    import json
    from copy import deepcopy
  
    if net_type == 'dat':
      exp_dict = deepcopy(net.dat)
  
      if type(exp_dict['mat']) is not list:
        exp_dict['mat'] = exp_dict['mat'].tolist()
        if 'mat_orig' in exp_dict:
          exp_dict['mat_orig'] = exp_dict['mat_orig'].tolist()
  
    elif net_type == 'viz':
      exp_dict = net.viz
  
    elif net_type == 'sim_row':
      exp_dict = net.sim['row']
  
    elif net_type == 'sim_col':
      exp_dict = net.sim['col']
  
    # make json
    if indent == 'indent':
      exp_json = json.dumps(exp_dict, indent=2)
    else:
      exp_json = json.dumps(exp_dict)
  
    return exp_jsof export_net_json(net, net_type, indent='no-indent'):
    ''' export json string of dat '''
    import json
    from copy import deepcopy
  
    if net_type == 'dat':
      exp_dict = deepcopy(net.dat)
  
      if type(exp_dict['mat']) is not list:
        exp_dict['mat'] = exp_dict['mat'].tolist()
        if 'mat_orig' in exp_dict:
          exp_dict['mat_orig'] = exp_dict['mat_orig'].tolist()
  
    elif net_type == 'viz':
      exp_dict = net.viz
  
    elif net_type == 'sim_row':
      exp_dict = net.sim['row']
  
    elif net_type == 'sim_col':
      exp_dict = net.sim['col']
  
    # make json
    if indent == 'indent':
      exp_json = json.dumps(exp_dict, indent=2)
    else:
      exp_json = json.dumps(exp_dict)
  
    return exp_json
docs: export json string of dat