skip to Main Content

Json – Unmarshalling protobufs in Scala

I have previously got Unmarshalling working in Scala using ScalaPB and the following marshallers: implicit def marshaller[T <: GeneratedMessage]: ToEntityMarshaller[T] = PredefinedToEntityMarshallers.ByteArrayMarshaller.compose[T](r => r.toByteArray) implicit def unmarshaller[T <: GeneratedMessage with GeneratedMessageCompanion[Request]](implicit companion: GeneratedMessageCompanion[Request]): FromEntityUnmarshaller[Request] = { Unmarshaller.byteArrayUnmarshaller.map[Request](bytes => companion.parseFrom(bytes)) }…

VIEW QUESTION

Sending Html Email

I wish to send a HTML email ideally with images I am sending via googles smtp servers, I generate some html with inline css it looks like this <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html charset=UTF-8" /> </head> <body>…

VIEW QUESTION

Can Scala read JSON with string values without quotes?

I have a log in below format(json/ion) where the value of time_of_initial_request is in timestamp format but without double quotes. {post_handler_type:"trace", default_marketplace:"prod_iad", request_id:"5MTB3656X0JRL38R6LJY", rest_uri:"productApi/feature", client_logging_id:"PredictionMetadata", time_of_initial_request:2023-05-24T15:00:00.577Z } Since the field(key) name does not have quotes, I am using the allowUnquotedFieldNames…

VIEW QUESTION
Back To Top
Search