title: Are DTO's necessary when sending JSON from a RESTful web service?
body: <p>I'm attempting to build a RESTful web service using Spring MVC. I'm using Jackson's fasterxml JSON parser for communication between the client and server side.</p>
  
  <p>I'm trying to determine whether or not to implement DTO's (Data Transfer Objects) into my RESTful API. I'm currently utilizing Jackson's <code>@JsonProperty(access = Access.WRITE_ONLY)</code> and <code>@JsonIgnore</code> annotations to prevent sensitive fields (such as passwords) from being sent to the client side.</p>
  
  <p>So, are DTO's necessary when using JSON for communication between the client and the server when omitting sensitive fields from the response body or are the annotations <code>@JsonIgnore</code> and <code>@JsonProperty</code> sufficient enough to prevent sensitive data leakage?</p>