title: Is there a way to serialise Java TreeMap into a JSON?
body: <p>I have a Java TreeMap <code>frutitas</code> inside a custom object on the server side which I want to send to the frontend.</p>
  
  <p>I use <code>javax.ws</code> and <code>jackson</code> to serialise. The data that I get in the frontend looks like this:</p>
  
  <pre><code>{ "frutitas": {
      "entry": [
          {
              "key": "fruto 1",
              "value": "el banano"
          },
          {
              "key": "fruto 2",
              "value": "el pineapple"
          }
      ]
  }
  </code></pre>
  
  <p>But I want to get something like this, which is actually how I send the "frutitas" map inside the object that I send to the backend when I want to upload it:</p>
  
  <pre><code>{ 
      "frutitas": {
          "fruto 1": "el banano",
          "fruto 2": "el pineapple"
      }
  }
  </code></pre>