I am working on a project with this library. I have an API call that accepts the following payload
{
"first_name": "Mohit",
"age": 27,
"address": {
"line1": "abc",
"line2": "def",
"pincode": 400000
}
}
So, my User Object here has another Serializable Object called Address. I am unable to pass the model as it is in the Bundle by using the following snippet.
Bundle bundle = new Bundle();
bundle.putString("first_name", user.getFirstName());
bundle.putInt("age", user.getAge());
bundle.putSerializable("address", user.getAddress());
The API always gives 503 since the convertToJSON method in the BundleJSONConverter class gives "Unsupported type" exception always because the recursive call makes the class makes the Setter null as the Address object is not a List<T> or a Bundle.
Can you please fix this? Or suggest a workaround.
I am working on a project with this library. I have an API call that accepts the following payload
So, my
UserObject here has anotherSerializableObject calledAddress. I am unable to pass the model as it is in the Bundle by using the following snippet.The API always gives 503 since the
convertToJSONmethod in theBundleJSONConverterclass gives"Unsupported type"exception always because the recursive call makes the class makes theSetternull as theAddressobject is not aList<T>or aBundle.Can you please fix this? Or suggest a workaround.