Lazarus不是我最喜欢的开发工具:)
我有一个带有json数据的字符串,我如何解析它,并输出指定的键值?
use ...., fpJSON, JSONParser;
...
var jsonstring:string;
jsonstring:='[{"id":11,"text":"TEST","description":"Some text","created_at":"2012-04-26 01:50:29","state":"ACCEPTED"},{"id":49,"text":"TEST2","description":"Description test","created_at":"2012-05-01 19:16:43","state":"ACCEPTED"}]'
....
//how print all key 'text' with value (foreach all items and print 'text' and value only)
....
答案 0 :(得分:0)
您是否尝试在FPC和Lazarus目录中搜索JSON?应该有比赛的植物(至少在我的Lazarus CodeTyphon版本中有)。另外,这里有一些链接可以帮助您入门: