// // ViewController.swift // json读写 // // Created by mac on 15/7/14. // Copyright (c) 2015年 fangyuhao. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any addition
把json的数据写入到文件中 import json with open('data.json','w+') as f: json.dump({"name":"张彪"},f) 把json的数据从文件中读取出来 import json with open('data.json','r') as f: x=json.load(f) print(x,type(x))
procedure TForm1.VisitDirJsonTree(const AJsonObj: ISuperObject); var i: Integer; oItem: TSuperAvlEntry; begin for oItem in AJsonObj.AsObject do begin if oItem.Value.DataType = stObject then VisitDirJsonTree(oItem.Value) else if oItem.Value.DataType =