{"id":3659150,"date":"2024-02-12T08:00:54","date_gmt":"2024-02-12T13:00:54","guid":{"rendered":"https:\/\/spin.atomicobject.com\/?p=3659150"},"modified":"2024-02-09T17:49:06","modified_gmt":"2024-02-09T22:49:06","slug":"java-stream-api","status":"publish","type":"post","link":"https:\/\/spin.atomicobject.com\/java-stream-api\/","title":{"rendered":"Zip Archives with the Java Stream API"},"content":{"rendered":"<p>I&#8217;ve been working on a Java project that extracts files from Zip archives in several places. We&#8217;re making heavy use of the <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/util\/stream\/Stream.html\">Java Stream API<\/a> in this codebase, and I wanted to deal with the contents of the Zip archives in the same way. (That is, mapping the entries, filtering the entries, processing entries in parallel, etc.)<\/p>\n<p>The code I&#8217;m working with is provided with an <code>InputStream<\/code> that provides the bytes that make up the Zip archive. That means I don&#8217;t know if the contents are coming from the local file or from somewhere else (S3 bucket, database, etc.). I&#8217;m also only concerned with pulling out files and can ignore entries that represent a directory.<\/p>\n<h2>ExtractedFile record<\/h2>\n<p>To provide full separation from all the Java Zip APIs, I want the resulting Stream to yield records similar to the <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/util\/zip\/ZipEntry.html\">ZipEntry<\/a> class. However, they should only contain the filename and the contents of the file (the bytes).<\/p>\n<pre><code class=\"lang-java\">\n  public record ExtractedFile(String filename, byte[] bytes) {}\n<\/code><\/pre>\n<h2>Using ZipFile<\/h2>\n<p>On solution would be to save the contents of the <code>InputStream<\/code> to a temp file, use the built-in <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/util\/zip\/ZipFile.html\">ZipFile<\/a> class to read\/stream the entries, and then delete the temp file when we&#8217;re done. This <a href=\"https:\/\/blog.codeleak.pl\/2014\/06\/listing-zip-file-content-java-8.html\">Listing a ZIP file contents with Stream API in Java 8<\/a> post shows a simple example of how the <code>.stream()<\/code> method on <code>ZipFile<\/code> can be used.<\/p>\n<p>Building on that, here&#8217;s a full implementation that filters out directories, reads each entry into a byte array, and yields an <code>ExtractedFile<\/code> record for each entry:<\/p>\n<pre><code class=\"lang-java\">\n  public Stream extractFiles(InputStream archiveStream) throws IOException {\n\n    Path tempFile = Files.createTempFile(\"temp\", \".zip\");\n    try (archiveStream) {\n      Files.copy(archiveStream, tempFile, java.nio.file.StandardCopyOption.REPLACE_EXISTING);\n    }\n\n    var zipFile = new ZipFile(tempFile.toFile());\n\n    return zipFile\n      .stream()\n      .filter(entry -&gt; !entry.isDirectory())\n      .map(entry -&gt; {\n        try (var zipEntryInputStream = zipFile.getInputStream(entry)) {\n          return new ExtractedFile(\n            entry.getName(),\n            zipEntryInputStream.readAllBytes());\n        } catch (IOException e) {\n          throw new RuntimeException(\"Failed to extract entry\", e);\n        }\n      })\n      .onClose(() -&gt; {\n        try {\n          zipFile.close();\n          Files.delete(tempFile);\n        } catch (IOException e) {\n          logger.warn(\"Error closing zip archive\", e);\n        }\n      });\n  }\n<\/code><\/pre>\n<p>And an example usage might look like:<\/p>\n<pre><code class=\"lang-java\">\n  \/\/ Use a try-with-resources to ensure the stream gets closed\n  try (var entryStream = ZipUtils.extractFiles(archiveStream)) {\n    entryStream\n        .filter(entry -&gt; entry.filename().endsWith(\".txt\"))\n        .parallel()\n        .forEach(entry -&gt; {\n          \/\/ do something with the text file\n        });\n  }\n<\/code><\/pre>\n<p>Things to note about this implementation:<\/p>\n<ul>\n<li>The contents of the zip archive are first written to a temp file, which is then read back into memory by the <code>ZipFile<\/code>. The temp file is deleted when the stream is closed.<\/li>\n<li>It&#8217;s parallel-izable in that a <code>.parallel()<\/code> can be tacked onto the resulting stream without causing problems.<\/li>\n<\/ul>\n<h2>Using ZipInputStream<\/h2>\n<p>The <code>ZipFile<\/code> based implementation above works, but it adds in the extra overhead of writing the contents of the input stream to a temp file, and then reading it back in (and then having to delete it). In most situations, this is probably acceptable. But, I wanted to see what it would look like to do it without the temp file.<\/p>\n<p>This next implementation relies on the <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/util\/zip\/ZipInputStream.html\">ZipInputStream<\/a> class, which can read the contents of a zip archive from an <code>InputStream<\/code> without needing to write it to a file first. The <code>ZipInputStream<\/code> class is a bit more low-level than the <code>ZipFile<\/code> class, so it requires a bit more work to get it to do what we want.<\/p>\n<p>I also don&#8217;t want to read the entire contents of the ZIP archive into memory right away. Rather, I want to read in each entry lazily as the next one is requested from the stream. One way to do this is by using a <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/util\/Spliterator.html\">Spliterator<\/a> implementation to read the entries in one at a time.<\/p>\n<pre><code class=\"lang-java\">\n  public Stream extractFiles(InputStream archiveStream) throws IOException {\n\n    var archive = new ZipInputStream(archiveStream);\n    var resultStream = StreamSupport.&lt;ExtractedFile&gt;stream(\n      new Spliterators.AbstractSpliterator&lt;&gt;(Long.MAX_VALUE, 0) {\n\n        @Override\n        public boolean tryAdvance(Consumer&lt;? super ExtractedFile&gt; action) {\n\n          \/\/ Find the next non-directory entry\n          var entry = archive.getNextEntry();\n          while (entry != null &amp;&amp; entry.isDirectory()) {\n            entry = archive.getNextEntry();\n          }\n\n          \/\/ We've reached the end of the archive\n          if (entry == null) {\n            return false;\n          }\n\n          try {\n            action.accept(new ExtractedFile(\n              entry.getName(),\n              archive.readAllBytes()));\n            return true;\n          } finally {\n            try {\n              archive.closeEntry();\n            } catch (IOException e) {\n              logger.warn(\"Error closing zip entry\", e);\n            }\n          }\n        }\n      },\n      \/\/ This false is important - it ensures the above is only called sequentially\n      false);\n\n    return resultsStream.onClose(() -&gt; {\n      try {\n        archive.close();\n      } catch (IOException e) {\n        logger.error(\"Error closing zip archive\", e);\n      }\n    });\n  }\n<\/code><\/pre>\n<p>There&#8217;s no difference in the usage of this implementation. The same example code from above should have the same results.<\/p>\n<p>Things to note about this implementation:<\/p>\n<ul>\n<li>As the comment indicates, it&#8217;s critical to specify <code>false<\/code> as the second argument to <code>StreamSupport.stream<\/code> otherwise a <code>.parallel()<\/code> on the resulting stream will cause errors (the contents of the zip archive will be read in parallel, which isn&#8217;t supported by the ZipInputStream).<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>Both of these implementations work are functionally equivalent. The <code>ZipFile<\/code> implementation is a bit simpler but has the runtime downside of having to write the contents of the zip archive to a temp file first. The <code>ZipInputStream<\/code> implementation is more code, and a little more complex, but can stream the contents of the zip archive directly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been working on a Java project that extracts files from Zip archives in several places. We&#8217;re making heavy use of the Java Stream API in this codebase, and I wanted to deal with the contents of the Zip archives in the same way. (That is, mapping the entries, filtering the entries, processing entries in [&hellip;]<\/p>\n","protected":false},"author":407,"featured_media":3659960,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1764],"tags":[564,941],"series":[],"class_list":["post-3659150","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java-dev","tag-java","tag-api"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Zip Archives with the Java Stream API<\/title>\n<meta name=\"description\" content=\"Here are example implementations of creating a Java Stream API that yields the entries in a ZIP archive, reading from a provided InputStream.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/spin.atomicobject.com\/java-stream-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Zip Archives with the Java Stream API\" \/>\n<meta property=\"og:description\" content=\"Here are example implementations of creating a Java Stream API that yields the entries in a ZIP archive, reading from a provided InputStream.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/spin.atomicobject.com\/java-stream-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Atomic Spin\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/atomicobject\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-12T13:00:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/spin.atomicobject.com\/wp-content\/uploads\/JillDeVriesPhotography-Sept2019-388-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1707\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Patrick Bacon\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@atomicobject\" \/>\n<meta name=\"twitter:site\" content=\"@atomicobject\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Patrick Bacon\" \/>\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:\\\/\\\/spin.atomicobject.com\\\/java-stream-api\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/spin.atomicobject.com\\\/java-stream-api\\\/\"},\"author\":{\"name\":\"Patrick Bacon\",\"@id\":\"https:\\\/\\\/spin.atomicobject.com\\\/#\\\/schema\\\/person\\\/b1ae70970124ba464ef398b4f93b4a65\"},\"headline\":\"Zip Archives with the Java Stream API\",\"datePublished\":\"2024-02-12T13:00:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/spin.atomicobject.com\\\/java-stream-api\\\/\"},\"wordCount\":607,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/atomicobject.com\\\/\"},\"image\":{\"@id\":\"https:\\\/\\\/spin.atomicobject.com\\\/java-stream-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/spin.atomicobject.com\\\/wp-content\\\/uploads\\\/JillDeVriesPhotography-Sept2019-388-scaled.jpg\",\"keywords\":[\"java\",\"API\"],\"articleSection\":[\"Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/spin.atomicobject.com\\\/java-stream-api\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/spin.atomicobject.com\\\/java-stream-api\\\/\",\"url\":\"https:\\\/\\\/spin.atomicobject.com\\\/java-stream-api\\\/\",\"name\":\"Zip Archives with the Java Stream API\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/spin.atomicobject.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/spin.atomicobject.com\\\/java-stream-api\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/spin.atomicobject.com\\\/java-stream-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/spin.atomicobject.com\\\/wp-content\\\/uploads\\\/JillDeVriesPhotography-Sept2019-388-scaled.jpg\",\"datePublished\":\"2024-02-12T13:00:54+00:00\",\"description\":\"Here are example implementations of creating a Java Stream API that yields the entries in a ZIP archive, reading from a provided InputStream.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/spin.atomicobject.com\\\/java-stream-api\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/spin.atomicobject.com\\\/java-stream-api\\\/#primaryimage\",\"url\":\"https:\\\/\\\/spin.atomicobject.com\\\/wp-content\\\/uploads\\\/JillDeVriesPhotography-Sept2019-388-scaled.jpg\",\"contentUrl\":\"https:\\\/\\\/spin.atomicobject.com\\\/wp-content\\\/uploads\\\/JillDeVriesPhotography-Sept2019-388-scaled.jpg\",\"width\":2560,\"height\":1707,\"caption\":\"Zip Archives with the Java Stream API\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/spin.atomicobject.com\\\/#website\",\"url\":\"https:\\\/\\\/spin.atomicobject.com\\\/\",\"name\":\"Atomic Spin\",\"description\":\"Atomic Object\u2019s blog on everything we find fascinating.\",\"publisher\":{\"@id\":\"https:\\\/\\\/atomicobject.com\\\/\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/spin.atomicobject.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/spin.atomicobject.com\\\/#organization\",\"name\":\"Atomic Object\",\"url\":\"https:\\\/\\\/spin.atomicobject.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/spin.atomicobject.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/spin.atomicobject.com\\\/wp-content\\\/uploads\\\/AO-Logo-Emblem-Color.png\",\"contentUrl\":\"https:\\\/\\\/spin.atomicobject.com\\\/wp-content\\\/uploads\\\/AO-Logo-Emblem-Color.png\",\"width\":258,\"height\":244,\"caption\":\"Atomic Object\"},\"image\":{\"@id\":\"https:\\\/\\\/spin.atomicobject.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/atomicobject\",\"https:\\\/\\\/x.com\\\/atomicobject\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/spin.atomicobject.com\\\/#\\\/schema\\\/person\\\/b1ae70970124ba464ef398b4f93b4a65\",\"name\":\"Patrick Bacon\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f41c671e4a227c4fa2a71be81c92fb792a243799d14fa702fbabd0e00a4ed8af?s=96&d=blank&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f41c671e4a227c4fa2a71be81c92fb792a243799d14fa702fbabd0e00a4ed8af?s=96&d=blank&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f41c671e4a227c4fa2a71be81c92fb792a243799d14fa702fbabd0e00a4ed8af?s=96&d=blank&r=pg\",\"caption\":\"Patrick Bacon\"},\"description\":\"Software Consultant and Developer. Loves making software, learning new technologies, and being an Atom.\",\"sameAs\":[\"http:\\\/\\\/www.linkedin.com\\\/in\\\/patrickbacon\\\/en\"],\"url\":\"https:\\\/\\\/spin.atomicobject.com\\\/author\\\/bacon\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Zip Archives with the Java Stream API","description":"Here are example implementations of creating a Java Stream API that yields the entries in a ZIP archive, reading from a provided InputStream.","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:\/\/spin.atomicobject.com\/java-stream-api\/","og_locale":"en_US","og_type":"article","og_title":"Zip Archives with the Java Stream API","og_description":"Here are example implementations of creating a Java Stream API that yields the entries in a ZIP archive, reading from a provided InputStream.","og_url":"https:\/\/spin.atomicobject.com\/java-stream-api\/","og_site_name":"Atomic Spin","article_publisher":"https:\/\/www.facebook.com\/atomicobject","article_published_time":"2024-02-12T13:00:54+00:00","og_image":[{"width":2560,"height":1707,"url":"https:\/\/spin.atomicobject.com\/wp-content\/uploads\/JillDeVriesPhotography-Sept2019-388-scaled.jpg","type":"image\/jpeg"}],"author":"Patrick Bacon","twitter_card":"summary_large_image","twitter_creator":"@atomicobject","twitter_site":"@atomicobject","twitter_misc":{"Written by":"Patrick Bacon","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/spin.atomicobject.com\/java-stream-api\/#article","isPartOf":{"@id":"https:\/\/spin.atomicobject.com\/java-stream-api\/"},"author":{"name":"Patrick Bacon","@id":"https:\/\/spin.atomicobject.com\/#\/schema\/person\/b1ae70970124ba464ef398b4f93b4a65"},"headline":"Zip Archives with the Java Stream API","datePublished":"2024-02-12T13:00:54+00:00","mainEntityOfPage":{"@id":"https:\/\/spin.atomicobject.com\/java-stream-api\/"},"wordCount":607,"commentCount":0,"publisher":{"@id":"https:\/\/atomicobject.com\/"},"image":{"@id":"https:\/\/spin.atomicobject.com\/java-stream-api\/#primaryimage"},"thumbnailUrl":"https:\/\/spin.atomicobject.com\/wp-content\/uploads\/JillDeVriesPhotography-Sept2019-388-scaled.jpg","keywords":["java","API"],"articleSection":["Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/spin.atomicobject.com\/java-stream-api\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/spin.atomicobject.com\/java-stream-api\/","url":"https:\/\/spin.atomicobject.com\/java-stream-api\/","name":"Zip Archives with the Java Stream API","isPartOf":{"@id":"https:\/\/spin.atomicobject.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/spin.atomicobject.com\/java-stream-api\/#primaryimage"},"image":{"@id":"https:\/\/spin.atomicobject.com\/java-stream-api\/#primaryimage"},"thumbnailUrl":"https:\/\/spin.atomicobject.com\/wp-content\/uploads\/JillDeVriesPhotography-Sept2019-388-scaled.jpg","datePublished":"2024-02-12T13:00:54+00:00","description":"Here are example implementations of creating a Java Stream API that yields the entries in a ZIP archive, reading from a provided InputStream.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/spin.atomicobject.com\/java-stream-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/spin.atomicobject.com\/java-stream-api\/#primaryimage","url":"https:\/\/spin.atomicobject.com\/wp-content\/uploads\/JillDeVriesPhotography-Sept2019-388-scaled.jpg","contentUrl":"https:\/\/spin.atomicobject.com\/wp-content\/uploads\/JillDeVriesPhotography-Sept2019-388-scaled.jpg","width":2560,"height":1707,"caption":"Zip Archives with the Java Stream API"},{"@type":"WebSite","@id":"https:\/\/spin.atomicobject.com\/#website","url":"https:\/\/spin.atomicobject.com\/","name":"Atomic Spin","description":"Atomic Object\u2019s blog on everything we find fascinating.","publisher":{"@id":"https:\/\/atomicobject.com\/"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/spin.atomicobject.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/spin.atomicobject.com\/#organization","name":"Atomic Object","url":"https:\/\/spin.atomicobject.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/spin.atomicobject.com\/#\/schema\/logo\/image\/","url":"https:\/\/spin.atomicobject.com\/wp-content\/uploads\/AO-Logo-Emblem-Color.png","contentUrl":"https:\/\/spin.atomicobject.com\/wp-content\/uploads\/AO-Logo-Emblem-Color.png","width":258,"height":244,"caption":"Atomic Object"},"image":{"@id":"https:\/\/spin.atomicobject.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/atomicobject","https:\/\/x.com\/atomicobject"]},{"@type":"Person","@id":"https:\/\/spin.atomicobject.com\/#\/schema\/person\/b1ae70970124ba464ef398b4f93b4a65","name":"Patrick Bacon","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f41c671e4a227c4fa2a71be81c92fb792a243799d14fa702fbabd0e00a4ed8af?s=96&d=blank&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/f41c671e4a227c4fa2a71be81c92fb792a243799d14fa702fbabd0e00a4ed8af?s=96&d=blank&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f41c671e4a227c4fa2a71be81c92fb792a243799d14fa702fbabd0e00a4ed8af?s=96&d=blank&r=pg","caption":"Patrick Bacon"},"description":"Software Consultant and Developer. Loves making software, learning new technologies, and being an Atom.","sameAs":["http:\/\/www.linkedin.com\/in\/patrickbacon\/en"],"url":"https:\/\/spin.atomicobject.com\/author\/bacon\/"}]}},"_links":{"self":[{"href":"https:\/\/spin.atomicobject.com\/wp-json\/wp\/v2\/posts\/3659150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spin.atomicobject.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spin.atomicobject.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spin.atomicobject.com\/wp-json\/wp\/v2\/users\/407"}],"replies":[{"embeddable":true,"href":"https:\/\/spin.atomicobject.com\/wp-json\/wp\/v2\/comments?post=3659150"}],"version-history":[{"count":0,"href":"https:\/\/spin.atomicobject.com\/wp-json\/wp\/v2\/posts\/3659150\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/spin.atomicobject.com\/wp-json\/wp\/v2\/media\/3659960"}],"wp:attachment":[{"href":"https:\/\/spin.atomicobject.com\/wp-json\/wp\/v2\/media?parent=3659150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spin.atomicobject.com\/wp-json\/wp\/v2\/categories?post=3659150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spin.atomicobject.com\/wp-json\/wp\/v2\/tags?post=3659150"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/spin.atomicobject.com\/wp-json\/wp\/v2\/series?post=3659150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}