<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ilias Gazdaliev</title>
    <description>The latest articles on DEV Community by Ilias Gazdaliev (@eljoy).</description>
    <link>https://dev.to/eljoy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F268316%2F30421df2-9232-4d22-bfe1-c5905222fe81.jpeg</url>
      <title>DEV Community: Ilias Gazdaliev</title>
      <link>https://dev.to/eljoy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eljoy"/>
    <language>en</language>
    <item>
      <title>Introducing ts-jackson, a typescript library to deserialize/serialize deeply nested json structures.</title>
      <dc:creator>Ilias Gazdaliev</dc:creator>
      <pubDate>Tue, 10 May 2022 18:40:10 +0000</pubDate>
      <link>https://dev.to/eljoy/introducing-ts-jackson-a-typescript-library-to-deserializeserialize-deeply-nested-json-structures-1o1</link>
      <guid>https://dev.to/eljoy/introducing-ts-jackson-a-typescript-library-to-deserializeserialize-deeply-nested-json-structures-1o1</guid>
      <description>&lt;p&gt;&lt;a href="https://www.npmjs.com/package/ts-jackson"&gt;ts-jackson&lt;/a&gt; is a json seralization library aimed to effortlessly handle serialization/deserialization of deeply nested json structures.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const jsonData = {
  images: {
    items: [
      {
        height: 300,
        url:
          'https://i.scdn.co/image/ab67616d0000b27380368f0aa8f90c51674f9dd2',
        width: 300,
      },
      {
        height: 640,
        url:
          'https://i.scdn.co/image/ab67616d00001e0280368f0aa8f90c51674f9dd2',
        width: 640,
      },
    ],
  },
}

@Serializable()
class Playlist {
  @JsonProperty('images.items[1]')
  readonly backgroundImage: Image
}

const deserialized = deserialize(jsonData, Playlist)
// Playlist {
//   backgroundImage: Image {
//     height: 640,
//     width: 640,
//     url: 'https://i.scdn.co/image/ab67616d00001e0280368f0aa8f90c51674f9dd2'
//   }
// }
const serialized = serialize(deserialized)
// {
//   images: {
//     items: [undefined, {
//       height: 640,
//       width: 640,
//       url: 'https://i.scdn.co/image/ab67616d00001e0280368f0aa8f90c51674f9dd2',
//     }],
//   },
// }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It uses &lt;a href="https://lodash.com/"&gt;Lodash&lt;/a&gt; &lt;code&gt;_.get/_.set&lt;/code&gt; to resolve property paths and supports every pattern provided by Lodash.&lt;/p&gt;

&lt;p&gt;You can check out the full api here:&lt;br&gt;
&lt;a href="https://github.com/Eljoy/ts-jackson"&gt;https://github.com/Eljoy/ts-jackson&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every feedback is truly welcomed. :)&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>javascript</category>
      <category>json</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
