<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Scala on Nikita Ryanov</title><link>https://nryanov.com/categories/scala/</link><description>Recent content in Scala on Nikita Ryanov</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 08 May 2021 22:17:26 +0300</lastBuildDate><atom:link href="https://nryanov.com/categories/scala/index.xml" rel="self" type="application/rss+xml"/><item><title>How to create a small json lib using antlr and shapeless</title><link>https://nryanov.com/scala/json-lib-shapeless-antlr4/</link><pubDate>Sat, 08 May 2021 22:17:26 +0300</pubDate><guid>https://nryanov.com/scala/json-lib-shapeless-antlr4/</guid><description>&lt;p&gt;In this article i will show how antlr4 and shapeless can be used to create a small json library (not for production, of course ^_^)
with ability to decode arbitrary json strings into case classes and encode them back with some scala magic.&lt;/p&gt;
&lt;h2 id="project-setup"&gt;Project setup&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s begin with a project setup.&lt;/p&gt;
&lt;p&gt;Generally speaking, it doesn&amp;rsquo;t really matter which IDE you will use, but i&amp;rsquo;ll use a Intellij Idea. Community edition is more than enough for it. Also, i recommend to instal &lt;a href="https://plugins.jetbrains.com/plugin/7358-antlr-v4"&gt;antlr4 plugin&lt;/a&gt; for intellij – it&amp;rsquo;s not necessary, but it really helps to create and debug antlr grammar.&lt;/p&gt;</description></item></channel></rss>