Asp.Net Core JsonPatchDocument: How to inspect operations server-side?
<p>I'm just starting with PATCH requests in Asp.NET core with <a href="https://docs.asp.net/projects/api/en/latest/autoapi/Microsoft/AspNetCore/JsonPatch/JsonPatchDocument-TModel/index.html" rel="nofollow">JsonPatchDocument&lt;TModel&gt;</a>.</p>

<p>This class has the cool feature that I can add Operations like:</p>

<pre><code>patchDoc.Replace(i=&gt;i.IntegerProperty, 3);
patchDoc.Replace(i=&gt;i.AnotherProperty, "AnotherStringValue");
</code></pre>

<p>Now, I can send this to my Asp.Net service and get a nice <code>JsonPatchDocument&lt;TModel&gt;</code> deserialized into my controller method.</p>

<p>But I'd like to validate that, for instance, "AnotherStringValue" satisfies a certain Regex.</p>

<p>Is there anyway I can find all operations that pertain to a certain member expression, like for instance <code>patchDoc.FindOperationsFor(i=&gt;i.AnotherProperty)</code>? Or is there a way to translate a member expression into a path string?</p>