各位在使用过程中如果发现bug麻烦告诉我,我改一下。我自己测试,目前没有问题。
ojson=NEWOBJECT([json],[myclass])
ojson.Add("
https://bbs.bccn.net/thread-514069-2-1.html","网址")
ojson.Add("Sam Jiang","用户名")
ojson.Add(".t.","性别")
?ojson.generate()
&&显示:{"网址":"
https://bbs.bccn.net/thread-514069-2-1.html","用户名":"Sam Jiang","性别":".t."}
ojsa=NEWOBJECT([jsonarray],[myclass])
ojsa.add("123")
ojsa.add("abc")
ojsa.add(".f.")
?ojsa.generate()
&& 显示:["123","abc",".f."]
ojson.Add(ojsa,"array")
?ojson.generate()
&&显示:{"网址":"
https://bbs.bccn.net/thread-514069-2-1.html","用户名":"Sam Jiang","性别":".t.","array":["123","abc",".f."]}