cocos2d x - Parse json file in cocos2dx -
i working on cocos2d-x project use code ios , android both. using json file store unlock data don't know how parse data in cocos2dx. can have brief tutorial (demo code) can proceed project.
i have created json file , save data in it. put demo of inside json file.
{ "id": "food", "name": "cherry", "price": "20 coins", "unlock": { "level": 15, "advance_unlock_price": "200 coins" } }
you can use rapidjson part of cocos2d-x.
using rapidjson in cocos2d-x: creating json document in code , serializing it
Comments
Post a Comment