zeab / aenea

Automatic case class xml serilization and deseriliztation

GitHub

Aenea

An automatic xml case class serializer and deserializer using reflection which so far has not failed me running this multithreaded with Akka.

Maven Central Build Status Codacy Badge

Xml Serialize:

import zeab.aenea.XmlSerializer._
case class MyDoubleClass(myDouble:Double)
val obj: MyDoubleClass = MyDoubleClass(1.1)
val serializedXml: Either[Throwable, String] = obj.asXml

Xml Deserialize:

case class MyBooleanClass(myBoolean:Boolean)
val expectedType: String = "MyBooleanClass"
val xml: String = "<myBooleanClass><myBoolean>false</myBoolean></myBooleanClass>"
val obj = xml.fromXml[MyBooleanClass]