convert network to json