Browsed by
Tag: dev

[iOS] – Create API wrapper with AFNetworking ?>

[iOS] – Create API wrapper with AFNetworking

Okay, so why AFNetworking? Well, this is a small quote from github: Perhaps the most important feature of all, however, is the amazing community of developers who use and contribute to AFNetworking every day. AFNetworking powers some of the most popular and critically-acclaimed apps on the iPhone, iPad, and Mac. That’s enough for a library right? Let’s start! 1. Installation There are some way to install the library, I choose the Pods method because it’s simple and easy to upgrade after….

Read More Read More

[PHP] – json_decode() for big integers ?>

[PHP] – json_decode() for big integers

json_decode() is use for decode a json text to object (or array) in PHP. For normal case, below code will decode a json string to an array in PHP:

But if the json contain a really big integers then the problem will be appear, take a look at below code:

The result will be:

So the solution here is we need to tell the json_decode function that we need to convert the big integers to string. Something like…

Read More Read More