Skip to content

JSON Extractor NG v0.2.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@farmdawgnation farmdawgnation released this 29 Nov 02:10
· 7 commits to master since this release
v0.2.0

This is the second release of a custom, Scala reflection based extractor for Lift JSON's AST.

If you're not super familiar with Lift JSON, extraction is the point at which we take an AST, which is simply a dumb representation of JSON in memory, and turn it into a concrete Scala class (String, class of your choosing, etc). The code we currently use for extraction in Lift JSON relies on Java reflection and the Scala compiler library. This implementation, by contrast, uses Scala reflection and provides a much cleaner implementation for the same functionality.

Improvements in this Release

  • The new extractor now supports extracting Arrays
  • The new extractor now supports extracting using custom Serializer instances defined as a part of your Formats object.

Using JSON Extractor NG

This module is a bit special because it's pretty strict on its requirements. Specifically, it requires:

  • Lift 3.1.x
  • Scala 2.12.4

It is available as a Lift module on Maven Central. You can include it in your project by adding the following to your build file:

libraryDependencies += "net.liftmodules" %% "json-extractor-ng_3.1" % "0.2.0"

Try it out, let me know what you think, and file issues for any bugs you find!