-2
我有一個包含以下數據的json文件。它在http://jsonlint.com/上被檢測爲無效的json,因此在php中被檢測爲字符串而不是json。有關如何解決這個問題在PHP中的任何建議?我無法手動更改每個文件,因爲我有超過一千個文件。JSON文件無效
{"contributors":null,"text":"@bru: i'll NEVER stop rollerblading! had a great dream last night that i was rollerblading while wearing a jetpack. must investigate...","geo":null,"retweeted":false,"in_reply_to_screen_name":null,"truncated":false,"entities":{"urls":[],"hashtags":[],"user_mentions":[{"id":null,"name":null,"indices":[0,4],"screen_name":"@bru","id_str":null}]},"in_reply_to_status_id_str":null,"id":1856693,"in_reply_to_user_id_str":null,"source":"web","favorited":false,"in_reply_to_status_id":null,"retweet_count":0,"in_reply_to_user_id":null,"created_at":"Sat Dec 30 12:47:22 +0000 2006","id_str":"1856693","place":null,"user":{"location":"Cambridge, UK","default_profile":false,"statuses_count":0,"profile_background_tile":true,"lang":"","profile_link_color":"78B0C8","id":12763,"following":false,"favourites_count":0,"protected":false,"profile_text_color":"000000","contributors_enabled":false,"description":"an infinitely hot and dense dot","verified":false,"name":"Rik Abel","profile_sidebar_border_color":"CDCDCD","profile_background_color":"FFFFFF","created_at":"Mon Jan 16 21:30:35 +0000 2006","default_profile_image":false,"followers_count":0,"geo_enabled":true,"profile_background_image_url":"http://a1.twimg.com/images/themes/theme/bg.gif","follow_request_sent":false,"url":"http://www.rikabel.com","utc_offset":0,"time_zone":"London","notifications":null,"profile_use_background_image":true,"friends_count":0,"profile_sidebar_fill_color":"ffffff","screen_name":"rikabel","id_str":"12763","profile_image_url":"riksplit.jpg","show_all_inline_media":false,"is_translator":false,"listed_count":0}}
{"info":{"message":"Replay Request Completed","sent":"2013-12-24T03:19:36+00:00","activity_count":1}}
也許你可以通過編程來糾正所有的文件 –
你可以從找出文件中的錯誤開始。 – njzk2
這是一個還是兩個JSON文件? –