Add helper class for constructing networks from JSON.