【发布时间】:2015-06-19 16:47:57
【问题描述】:
我有以下类型的 json 数据,我想使用 java 正则表达式从数据中提取标题
{
"Title": "nice television for the price",
"Author": "Jackie C",
"ReviewID": "R3LDJA7HU2Q0FS",
"Overall": "4.0",
"Content": "The television was a refurbished one, and for the price, quality of pictures, sound, i am enjoying it at this very moment. I'm glad that I made a good choice thus far without having any problems with the television. Thanks",
"Date": "April 13, 2014"
}
请告诉我从数据中提取标题的正则表达式是什么
【问题讨论】:
-
不要使用正则表达式。使用 JSON 解析器。
-
我建议你看看 org.json 库 (import org.json.*) 而不是使用正则表达式。
-
感谢快速回复,我已经尝试过使用 json 解析器,但我得到了 '[ ' 错误
-
您也可以使用 GSON。
-
是否有任何基于 gui 的工具可以轻松解析我的 json 数据,,,实际上我想从 json 文件中提取标题,,,