title: Converting Java object to JSON with specific syntax
body: <p>I want to convert Java object to JSON string. Lets say the object looks like this:    </p>
  
  <pre><code>public class User{
      private Long id;
      private String firstName;
  }
  </code></pre>
  
  <p>And the json should look like this:</p>
  
  <pre><code>{
      "inputFields":[
          {
              "name":"id",
              "value":"123"
          },
          {
              "name":"firstName",
              "value":"George"
          }
      ]
  }
  </code></pre>
  
  <p>Tried to use Jackson, but it looks like it doesn't provide such kind of serialization.      </p>