0
我從MySQL數據庫json
字符串:怎麼辦JSON字符串轉換爲字符串
{"teams":[{"sport":"NFL"},{"sport":"NBA"},{"sport":"NCAA Football"},{"sport":"NCAA Men Basketball"}],"success":1}
,我需要這個字符串轉換爲以下格式:
final String sports[] = {"NFL", "NBA", "NCAA Football", "NCAA Men Basketball"};
任何想法如何做這個?
這是什麼語言? – mindOfAi
大量的想法......並不多的線索 – grail
一個技巧是使用這樣的正則表達式:「sport」:「([A-Za-z \ s] *)」捕獲組恰恰是體育詞 –