How to create a small json lib using antlr and shapeless

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • Scout APM - Less time debugging, more time building
  • SaaSHub - Software Alternatives and Reviews
  • sbt-antlr4

    Antlr4 plugin for sbt 1.1+ and 0.13.x

    Now we are ready to create a new project. For project building i'll use sbt, but it is also possible to use maven or gradle. After project creation we need to add antlr4 compiler plugin – sbt-antlr4. Also, we will need a shapeless for codec derivation, so let's add this library too. After all, plugins.sbt and build.sbt will look like this:

  • grammars-v4

    Grammars written for ANTLR v4; expectation that the grammars are free of actions.

    First of all, we need a grammar. I think, that the best place for exploring grammars and take some ideas is grammars-v4. There are a lot of grammar examples, but we need a special one – json.

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • ANTLR

    ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.

    We will change it a little bit soon, but for now let's look on what's going on there. In general, grammar consists of parser and lexer rules.

  • json-serde

    Example of usage antlr4 and shapeless

    The source code of a whole project could be found here: https://github.com/nryanov/json-serde

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts