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

Json – Paypal API V2 create order malformed request

I keep getting malformed request when trying to create an order. My json looks like this. { "intent":"CAPTURE", "purchase_units":[ { "items":[ { "name":"Heartless", "description":"Short sleeve tshirt 230gram of 100% cotton, Heartless print on front empty back.", "quantity":2, "unit_amount":{ "currency_code":"EUR", "value":25.0…

VIEW QUESTION
Back To Top
Search