<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>techouse-dev</author_name>
  <author_url>https://blog.hatena.ne.jp/techouse-dev/</author_url>
  <blog_title>Techouse Developers Blog</blog_title>
  <blog_url>https://developers.techouse.com/</blog_url>
  <categories>
    <anon>Advent Calendar 2024</anon>
  </categories>
  <description>今回は、localStorage に保存された値を検証する場面で、Zod の parse 関数を利用した方法を紹介します。 筆者はこれまで localStorage から取得した値のパースに、JSON.parse を使っていましたが、Zod の parse 関数と組み合わせることで、より型安全に値をパースできました。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdevelopers.techouse.com%2Fentry%2Flocalstorage-parse-zod&quot; title=&quot;localStorage の値を Zod で安全にパースする - Techouse Developers Blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>http://res.cloudinary.com/dyjw65doo/image/upload/v1730790847/localstorage-parse-zod/ogp.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-12-08 12:00:00</published>
  <title>localStorage の値を Zod で安全にパースする</title>
  <type>rich</type>
  <url>https://developers.techouse.com/entry/localstorage-parse-zod</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
