Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88737

Js getValueMapFromFile

$
0
0

@875152940 写道:

let path = jsb.fileUtils.getWritablePath() + "abc.json";
jsb.fileUtils.writeValueMapToFile({
key1:"value1",
key2:"value2"
},path);

   let mvp = jsb.fileUtils.getValueMapFromFile(path);


    loge("JSON MVP=>" + JSON.stringify(mvp) + "  MVP size:" + mvp.size);

    mvp.forEach((v,k)=>{
       loge(" key =>" + k + " value=>" + value);
    });

log输出:MVP=>[] MVP size:undefined

帖子: 2

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88737

Trending Articles