WordPress Serialize the JSON object
Although WordPress got its own JSON API, you still have your own JSON API for your own plugin and serialize your own data. That is not a problem. WordPress library got a function to serialize any objects to JSON Format. That is very easy. You can use this function in any parts of your plug-in.
wp_send_json($user);
WordPress Finally got a REST API
I used Wordpress as the development framework for a mobile application project. Wordpress has a set of XMLPRC api for a very long time. Moreover, the mainstream in Mobile development is to use JSON as the communication format, rather than XML. JSON is smaller and easier to deserialize back to an object. Originally, I planned to use a third party plug-in for REST API and with my own code to build my own version REST API for my mobile application. Today, I checked my WordPress; It got an update for WordPress 4.7. After the updates, I found this version finally got an official REST API. That is great. I can build my code on top of that!
You can check this demo from Wordpress
This Special for IT Person
As a person who works in the IT field, what items are on specials this week doesn't sounds very related. But this week, there are a lot of good stuff which our IT people will like. Firstly, Woolworth marked down a $10 Optus pepiad SIM to $2.Wow, 80% off That SIM can have unlimited calls and SMS for 5 days and 500 MB data each day. Moreover, Coles has 20% off on the $30,$50,$100 iTune Gift Card and marked down a $30 Optus Prepaid SIM to $10. That is more than half price. This sim can have a monthly plan with unlimited calls and SMS for 28 days with 3GB data. If you activate it before Feb 2017, Optus will give you 3GB bonus data too.
I tested Mac Book Pro with Touch bar in Apple Store
Last Saturday, I went to Apple Store. I found there is a new Mac Pro book with Touch Bar. I had a play on that. I love touch bar. It can turn in the virtual keys, for example, when I need to change the volume, it displays a slider bar to come to the volume. I can slide the bar. This action we cannot do that with the volume. But if I buy one, I will use it as the main computer. I will use an external monitor and keyboard; that is not 100% useful for me.But that is very think and lightweight. That is very easy to carry around.
Robot Pepper
At the early of this year, I visited Japan. I saw a Pepper Robot in the mall. I tried to talk with him in English. I do not think he can understand. But when I tried to shake hand with him, he can understand and shake hand with me. That is cute. I think his AI can read human gestures.