1

I'm using AFNetworking version 3.1 in Cocopods. When call the API, the response is not correct. Some decimal had been append on the result as below:

{ RewardTopUp = 100; RewardTopupGiven = 9.015000000000001; }

But the correct response backend should be as below:

{ RewardTopUp = 150; RewardTopupGiven = 9.015; }

Why the response will append a few decimal for the response object at AFNetworking?

Can someone help or someone had facing same issues?

user831098
  • 1,803
  • 6
  • 27
  • 47

1 Answers1

0

It could be because of number formatting. Please make sure from service and use JSON parsing

Nattudurai
  • 856
  • 7
  • 9