title: Spring JSON Patch unable to update nested Map object
body: <p>in my application I'm trying to support JSON patch requests to apply partial update my entities and I'm using directly the implementation of Patch provided by Spring in the spring-data-rest library. </p>
  
  <p>I'm not able to use the Spring Patch implementation to partially update Maps in Java, or the Spring implementation is not able to support such operation.</p>
  
  <p>Spring Patch converts JSON patch operations to SPEL operations, and everything works fine with POJOs having fixed properties (or field), but  it seems not working with Maps where I would assume the "fields" are the keys of the Map.</p>
  
  <p>Knowing that behind the scenes Spring converts a JSON path to a SPEL operation, I've also tried to use a SPEL notation in my PATCH payload, without any result. This is what I've tried</p>
  
  <p>Let's assume this is the situation:</p>
  
  <pre class="lang-java prettyprint-override"><code>//Here is my object
  public class Book {
  
      public String author;
  
      public String ISBN;
  
      public Map&lt;String, String&gt; characters;
  
  
  }
  
  // Here I create a simple instance of the object
  Book myBook = new Book();
  myBook.author = "Me"
  myBook.ISBN = "1234567890"
  myBook.characters = new HashMap&lt;&gt;();
  myBook.characters.put("protagonist", "Pinco");
  myBook.characters.put("antagonist", "Pallo");
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>// Here the type of operations that work
  [
      {"op": "replace", "path": "/author", "value": "NewAuthor"},
      {"op": "replace", "path": "/ISBN", "value": 0987654321 },
  ]
  
  // I can also modify completely the Map if I want
  [
      {"op": "replace", "path": "/characters", "value": {"protagonist": "Pallo", "antagonist": "Pinco"} }
  ]
  
  // But I can't update a single value in the map
  [
      {"op": "replace", "path": "/characters/protagonist", "value": "Pallo" },
      {"op": "replace", "path": "/characters/antagonist", "value": "Pinco" }
  ]
  
  // I've also tried weird stuff, but doesn't work
  [
      {"op": "replace", "path": "/characters[antagonist]", "value": "Pinco"}
  ]
  </code></pre>
  
  <p>I would expect the replace operation on the nested map to work by checking the key, but maybe I'm doing something wrong or I should simply represent all objects like POJOs with regular fields in order for this to work.</p>