title: Azure Cosmos SQL API - How do I store a custom object as @PartitionKey
body: <p>Is it possible to store a custom POJO as a Json String using @PartitionKey using Java 8.? Is yes, please tell me how .</p>
  <pre><code>import com.azure.spring.data.cosmos.core.mapping.PartitionKey;
  
      @PartitionKey
          private Result result;
  </code></pre>
  <p>result will have value like <code>{&quot;resultID&quot;:&quot;1&quot;,&quot;secret&quot;:&quot;my secret&quot;}</code></p>