code: func (p Path) MarshalJSON() ([]byte, error) {
  	buffer := bytes.NewBufferString("{")
  	length := len(p)
  	count := 0
  	for key, value := range p {
  		jsonValue, err := json.Marshal(value)
  		if err != nil {
  			return nil, err
  		}
  		buffer.WriteString(fmt.Sprintf("\"%d\":%s", key, string(jsonValue)))
  		count++
  		if count < length {
  			buffer.WriteString(",")
  		}
  	}
  	buffer.WriteString("}")
  	return buffer.Bytes(), nil
  }
docs: // MarshalJSON allows Path to be serialized