code: func (aSpace *addrSpace) MarshalJSON() ([]byte, error) {
  	aSpace.Lock()
  	defer aSpace.Unlock()
  
  	m := map[string]interface{}{
  		"Scope": string(aSpace.scope),
  	}
  
  	if aSpace.subnets != nil {
  		s := map[string]*PoolData{}
  		for k, v := range aSpace.subnets {
  			s[k.String()] = v
  		}
  		m["Subnets"] = s
  	}
  
  	return json.Marshal(m)
  }
docs: // MarshalJSON returns the JSON encoding of the addrSpace object