{"id":24629,"date":"2014-04-25T22:00:05","date_gmt":"2014-04-25T19:00:05","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=24629"},"modified":"2014-04-25T13:40:30","modified_gmt":"2014-04-25T10:40:30","slug":"dropwizard-painless-restful-json-http-web-services","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html","title":{"rendered":"Dropwizard: painless RESTful JSON HTTP web services"},"content":{"rendered":"<p>Java developers looking for a quick, painless way of creating production-ready RESTful JSON HTTP web services should consider the <a href=\"http:\/\/dropwizard.codahale.com\/\">Dropwizard<\/a> framework. Dropwizard brings together well-regarded libraries that compliment each other so you can get to what\u2019s important: writing and delivering working code. For those interested in details on the libraries used, please refer to the <a href=\"http:\/\/dropwizard.codahale.com\/getting-started\/#overview\">Dropwizard overview<\/a>. Fortunately, Dropwizard doesn\u2019t make you deal with all of its individual components. You\u2019ll be able to keep your focus on your work at hand. If you\u2019ve got some time, stick around and let\u2019s make something with Dropwizard.<\/p>\n<p>All code for this tutorial is available at <a href=\"https:\/\/codeaweso.me\/_\/dwtutcode\">GitHub<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h2>How do you get started with Dropwizard?<\/h2>\n<p>A single Maven, Gradle, or Ivy dependency will get you all the components necessary for making Dropwizard-powered web services.<\/p>\n<pre class=\" brush:java\">&lt;dependency&gt;\r\n    &lt;groupId&gt;com.yammer.dropwizard&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;dropwizard-core&lt;\/artifactId&gt;\r\n    &lt;version&gt;0.6.2&lt;\/version&gt;\r\n&lt;\/dependency&gt;<\/pre>\n<p><em>Note<\/em>: Please refer to <a href=\"http:\/\/dropwizard.codahale.com\/getting-started\/\">Dropwizard\u2019s excellent documentation<\/a> if you encounter anything you think isn\u2019t explained sufficiently in this short posting.<\/p>\n<h2>What shall we make?<\/h2>\n<p>Let\u2019s make a web service that returns the current date and time for a given timezone. We\u2019ll use a configurable default timezone if a client decides not to specify one.<\/p>\n<h2>Configuration<\/h2>\n<p>Our super-simple <code>time-service.yml<\/code> configuration file will look like this.<\/p>\n<pre class=\" brush:java\">defaultTimezone: UTC<\/pre>\n<p>Behind the scenes, Dropwizard will load, parse, validate, and turn that configuration into an object. All we need to do is specify it as a class.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\" brush:java\">public class TimezoneConfiguration extends Configuration {\r\n    @NotEmpty\r\n    @JsonProperty\r\n    private String defaultTimezone;\r\n\r\n    public String getDefaultTimezone() { return defaultTimezone; }\r\n}<\/pre>\n<h2>Service Output<\/h2>\n<p>Let\u2019s say we want the output of our web service to look like this.<\/p>\n<pre class=\" brush:java\">{ \"time\": \"2014-02-04 13:45:02\" }<\/pre>\n<p>The corresponding class is straightforward.<\/p>\n<pre class=\" brush:java\">public class Time {\r\n    private final String time;\r\n\r\n    public Time(String time) {\r\n        this.time = time;\r\n    }\r\n\r\n    public String getTime() { return time; }\r\n}<\/pre>\n<h2>Resource<\/h2>\n<p>Next, we decide we want the URL path for our web service to be <code>\/time<\/code>. And we need to specify the resource will return JSON. Putting those together gives us this.<\/p>\n<pre class=\" brush:java\">@Path(\"\/time\")\r\n@Produces(MediaType.APPLICATION_JSON)\r\npublic class TimeResource {\r\n}<\/pre>\n<p>The only RESTful action that makes sense right now for our demo web service is <code>GET<\/code>, so let\u2019s make a method for that. When consuming our web service, the client can provide a timezone as a query string parameter.<\/p>\n<pre class=\" brush:java\">@GET\r\npublic Time getTime(@QueryParam(\"timezone\") String timezone) {\r\n}<\/pre>\n<p>That leaves us with three more things to do:<\/p>\n<ol>\n<li>handle a given timezone from the client<\/li>\n<li>substitute a default timezone if none is given<\/li>\n<li>format the current date and time with the timezone<\/li>\n<\/ol>\n<pre class=\" brush:java\">@Path(\"\/time\")\r\n@Produces(MediaType.APPLICATION_JSON)\r\npublic class TimeResource {\r\n    private final String defaultTimezone;\r\n\r\n    public TimeResource(String defaultTimezone) {\r\n        this.defaultTimezone = defaultTimezone;\r\n    }\r\n\r\n    @GET\r\n    public Time getTime(@QueryParam(\"timezone\") Optional timezone) {\r\n        DateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n        TimeZone timeZone = TimeZone.getTimeZone(timezone.or(defaultTimezone));\r\n        formatter.setTimeZone(timeZone);\r\n        String formatted = formatter.format(new Date());\r\n        return new Time(formatted);\r\n    }\r\n}<\/pre>\n<h2>Service<\/h2>\n<p>Now, let\u2019s bring together all the pieces of our web service in our entry-point class we\u2019ll call <code>TimeService<\/code>. Here we\u2019ll use our <code>TimezoneConfiguration<\/code> to pass the default timezone to <code>TimeResource<\/code>.<\/p>\n<pre class=\" brush:java\">public class TimeService extends Service {\r\n    public static void main(String[] args) throws Exception {\r\n        new TimeService().run(args);\r\n    }\r\n\r\n    @Override\r\n    public void run(TimezoneConfiguration config, Environment environment) {\r\n        String defaultTimezone = config.getDefaultTimezone();\r\n        TimeResource timeResource = new TimeResource(defaultTimezone);\r\n        environment.addResource(timeResource);\r\n    }\r\n\r\n    @Override\r\n    public void initialize(Bootstrap timezoneConfigurationBootstrap) {\r\n    }\r\n}<\/pre>\n<h2>Pencils Down<\/h2>\n<p>That\u2019s it! We\u2019ve just written a Dropwizard-based web service without mind-numbing boilerplate or mounds of obtuse XML configuration.<\/p>\n<h2>Running<\/h2>\n<p>Running your web service is as simple as executing a command-line Java application \u2013 no need to worry about .war files or servlet containers.<\/p>\n<pre class=\" brush:java\">java -cp libraries\/* name.christianson.mike.TimeService server time-service.yml<\/pre>\n<p>Now, point your web browser or curl at <code>http:\/\/localhost:8080\/time?timezone=MST<\/code> and have fun!<\/p>\n<ul>\n<li>All code for this tutorial is available at <a href=\"https:\/\/codeaweso.me\/_\/dwtutcode\">GitHub<\/a>.<\/li>\n<\/ul>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/codeaweso.me\/2014\/02\/dropwizard-painless-restful-json-http-web-services\/\">Dropwizard: painless RESTful JSON HTTP web services<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Mike Christianson at the <a href=\"https:\/\/codeaweso.me\/\">CodeAwesome<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Java developers looking for a quick, painless way of creating production-ready RESTful JSON HTTP web services should consider the Dropwizard framework. Dropwizard brings together well-regarded libraries that compliment each other so you can get to what\u2019s important: writing and delivering working code. For those interested in details on the libraries used, please refer to the &hellip;<\/p>\n","protected":false},"author":182,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[942,54],"class_list":["post-24629","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-dropwizard","tag-restful-web-services"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Dropwizard: painless RESTful JSON HTTP web services<\/title>\n<meta name=\"description\" content=\"Java developers looking for a quick, painless way of creating production-ready RESTful JSON HTTP web services should consider the Dropwizard framework.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dropwizard: painless RESTful JSON HTTP web services\" \/>\n<meta property=\"og:description\" content=\"Java developers looking for a quick, painless way of creating production-ready RESTful JSON HTTP web services should consider the Dropwizard framework.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2014-04-25T19:00:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mike Christianson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mike Christianson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/04\\\/dropwizard-painless-restful-json-http-web-services.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/04\\\/dropwizard-painless-restful-json-http-web-services.html\"},\"author\":{\"name\":\"Mike Christianson\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/ee876c048d9317dacb0611586cb343ee\"},\"headline\":\"Dropwizard: painless RESTful JSON HTTP web services\",\"datePublished\":\"2014-04-25T19:00:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/04\\\/dropwizard-painless-restful-json-http-web-services.html\"},\"wordCount\":475,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/04\\\/dropwizard-painless-restful-json-http-web-services.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"Dropwizard\",\"RESTful Web Services\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/04\\\/dropwizard-painless-restful-json-http-web-services.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/04\\\/dropwizard-painless-restful-json-http-web-services.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/04\\\/dropwizard-painless-restful-json-http-web-services.html\",\"name\":\"Dropwizard: painless RESTful JSON HTTP web services\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/04\\\/dropwizard-painless-restful-json-http-web-services.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/04\\\/dropwizard-painless-restful-json-http-web-services.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2014-04-25T19:00:05+00:00\",\"description\":\"Java developers looking for a quick, painless way of creating production-ready RESTful JSON HTTP web services should consider the Dropwizard framework.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/04\\\/dropwizard-painless-restful-json-http-web-services.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/04\\\/dropwizard-painless-restful-json-http-web-services.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/04\\\/dropwizard-painless-restful-json-http-web-services.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/04\\\/dropwizard-painless-restful-json-http-web-services.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Dropwizard: painless RESTful JSON HTTP web services\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/ee876c048d9317dacb0611586cb343ee\",\"name\":\"Mike Christianson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3986c304cc07e9b602da659f16bca158f466bfcc78d75401a5f1978581263399?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3986c304cc07e9b602da659f16bca158f466bfcc78d75401a5f1978581263399?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3986c304cc07e9b602da659f16bca158f466bfcc78d75401a5f1978581263399?s=96&d=mm&r=g\",\"caption\":\"Mike Christianson\"},\"description\":\"Mike Christianson is a Senior Software Engineer focused on customers and craftsmanship. He also leads the Phoenix Software Engineering Reading Group.\",\"sameAs\":[\"http:\\\/\\\/codeaweso.me\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Mike-Christianson\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dropwizard: painless RESTful JSON HTTP web services","description":"Java developers looking for a quick, painless way of creating production-ready RESTful JSON HTTP web services should consider the Dropwizard framework.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html","og_locale":"en_US","og_type":"article","og_title":"Dropwizard: painless RESTful JSON HTTP web services","og_description":"Java developers looking for a quick, painless way of creating production-ready RESTful JSON HTTP web services should consider the Dropwizard framework.","og_url":"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2014-04-25T19:00:05+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Mike Christianson","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Mike Christianson","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html"},"author":{"name":"Mike Christianson","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/ee876c048d9317dacb0611586cb343ee"},"headline":"Dropwizard: painless RESTful JSON HTTP web services","datePublished":"2014-04-25T19:00:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html"},"wordCount":475,"commentCount":1,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["Dropwizard","RESTful Web Services"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html","url":"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html","name":"Dropwizard: painless RESTful JSON HTTP web services","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2014-04-25T19:00:05+00:00","description":"Java developers looking for a quick, painless way of creating production-ready RESTful JSON HTTP web services should consider the Dropwizard framework.","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2014\/04\/dropwizard-painless-restful-json-http-web-services.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Dropwizard: painless RESTful JSON HTTP web services"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/ee876c048d9317dacb0611586cb343ee","name":"Mike Christianson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3986c304cc07e9b602da659f16bca158f466bfcc78d75401a5f1978581263399?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3986c304cc07e9b602da659f16bca158f466bfcc78d75401a5f1978581263399?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3986c304cc07e9b602da659f16bca158f466bfcc78d75401a5f1978581263399?s=96&d=mm&r=g","caption":"Mike Christianson"},"description":"Mike Christianson is a Senior Software Engineer focused on customers and craftsmanship. He also leads the Phoenix Software Engineering Reading Group.","sameAs":["http:\/\/codeaweso.me\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Mike-Christianson"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/24629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/182"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=24629"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/24629\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=24629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=24629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=24629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}