<｜begin▁of▁sentence｜>### Instruction:
Given the Condensed Matter collaborations 2005 graph which can be read from a GML file named cond-mat-2005.gml, can you use the walkscan function in cdlib to perform community detection? And can you provide the JSON representation of the detected communities?
### Response:
import networkx as nx
from cdlib import algorithms

# Create a graph from the Condensed Matter collaborations 2005 dataset
g = nx.read_gml('cond-mat-2005.gml')

# Perform the WalkSCAN community detection algorithm
communities = algorithms.walkscan(g, nb_steps=5, eps=0.1, min_samples=3)

# Getting the JSON representation of the detected communities
communities_json = communities.to_json()

print(communities_json)
<|EOT|>
