Jackson Json Demo: Java and Scala

1. Copy Java Source Files:

Address.java, Employee.java and ReadWriteJson.java

2. Copy Scala Source Files:

Address2.scala, Employee2.scala and ReadWriteJson2.scala

3. Copy Json File:

employee.txt

4. Copy Build File:

build.sbt

5. Compile Java and Scala Source Files:


$ sbt compile

6. Run One of the Programs:


$ sbt run


The Simple Build Tool (sbt) is used. It works for both Java and Scala.

Scala makes the creation of Java Beans easy with the built-in BeanProperty annotation.

Java has no built in capabilities, but Project Lombok provides support.