JsonWriterPublisher

org.eso.ias.dasu.publisher.JsonWriterPublisher
class JsonWriterPublisher(val writer: Writer) extends OutputPublisher

The publisher of IASValues produced by the DASU in a JSON-like format.

The JSON output is composed of records of IASV-n JSON string of the IASValues like IASV1 IASV2 IASV3

The format of a true JSON file is [ IASV1, IASV2, IASV3,...]

The ideal solution would be to let Jackson2 write the array of IASValues passing one item at a time but, browsing the net, it does not seem as easy as I expected.

Value parameters

filePath

the path of the JSON file to write

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def cleanUpPublisher(): Try[Unit]

Release all the acquired resources.

Release all the acquired resources.

Attributes

See also

OutputPublisher.cleanUp()

Definition Classes
override def initializePublisher(): Try[Unit]

Initialize the publisher.

Initialize the publisher.

Attributes

See also

OutputPublisher.initialize()

Definition Classes
def publish(iasio: IASValue[_]): Try[Unit]

Publish the output.

Publish the output.

Value parameters

aisio

the not null IASIO to publish

Attributes

Returns

a try to let the caller aware of errors publishing

Concrete fields

val jsonSerializer: IasValueJsonSerializer

jsonSerializer translates IASValue into JSON string

jsonSerializer translates IASValue into JSON string

Attributes

val writer: Writer