In one of my projects, when i calculate the grand total
shippingDetails.grandTotal = 3.448873577E7
instead of 34488749.7
where grandTotal
is of type Double
The above object is in my data class and i need to pass as request body for a request, but it fails since it's having scientific notation.
@POST(AppConstants.Network.CONFIRM_PENDING_SHIPPING)
fun confirmPendingShipping(
@Header("Authorization") token: String,
@Body shippingItems: RequestConfirmShipping
): Single<ResponsePendingShipping>
I'm passing it as body of post using Retrofit