Hello,
I am new in protobuf and I am using Protobuf with Retrofit in android -
Kotlin
I have a message class Called *OtpResponse *
*syntax = "proto3";package model;option java_package =
"com.example.protobufdemonstration.model";option java_multiple_files =
true;message OtpResponse { bool status = 1;}*
When I get any repsonse from retrofit then I convert that Jsonto
OtpResponse Class using JsonFormat .parser().merge() function. Below is the
code that i have written for conversion:
*val builder =
OtpResponse.newBuilder()JsonFormat.parser().ignoringUnknownFields().merge(jsonObject.toString(),
builder)*
But In above response I am getting error in Merge Function Saying that
*None of the following functions can be called with the arguments supplied.*
*merge(Reader!, Message.Builder!)*
*merge(String!, Message.Builder!) *
How can I solve this error. Please help!!
Thanks,
Akash Koradia
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/protobuf/42068fed-225b-420c-b53d-e93dc69069b5n%40googlegroups.com.