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