title: JSONAPI Delete Relationship
body: <p>JSONAPI spec specifies the way to delete a relationships is via a <code>PATCH</code> request with the following body:</p>
  <pre><code>{ &quot;data&quot;: null }
  </code></pre>
  <p>However, I don't see any way of doing this with the <a href="https://github.com/google/jsonapi" rel="nofollow noreferrer">JSONAPI library by Google</a>.</p>
  <p>When ever I try to pass that body, I get the error:</p>
  <blockquote>
  <p>data is not a jsonapi representation</p>
  </blockquote>
  <p>which comes from <a href="https://github.com/google/jsonapi/blob/master/request.go#L145" rel="nofollow noreferrer">this line</a> in the source.</p>
  <p>The thing is, I see nothing in <code>unmarshalNode</code> or <code>UnmarshalPayload</code> that handles the fact that <code>data</code> is <code>null</code>. Further more, because this is a generic <code>recover</code> the actual error is a <code>nil reference</code> error, because it assumes <code>data</code> exists with something.</p>
  <p>Is there any way of actually doing a <code>PATCH</code> request with <code>null</code> data?</p>