请问!如何从以文本格式存放数据的文件中读取相应字段值再存放到数据库中

qq_41897817 2020-11-10 10:38:59
{"created_at":"Fri Feb 01 00:00:00 +0000 2013","id":297132154176016385,"id_str":"297132154176016385","text":"RT @DouraPerfeccion: siganos en https:\/\/t.co\/ZayRsVe2 damos FOLLOWBACK","source":"web","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":475317811,"id_str":"475317811","name":"Yohaa \u2665\u203f\u2665","screen_name":"AmandoAPepe","location":"Santiago Del Estero!","url":null,"description":"Pase cuatro noches inolvidables con Pepe ( 18\/01 - 19\/01 - 20\/01 - 21\/01 ) Le tuve agarrada la mano durando 1 minuto, le toque los pectorales. #PuedoMorirEnPaz","protected":false,"followers_count":1811,"friends_count":1081,"listed_count":1,"created_at":"Thu Jan 26 22:47:04 +0000 2012","favourites_count":158,"utc_offset":-14400,"time_zone":"Santiago","geo_enabled":false,"verified":false,"statuses_count":30299,"lang":"es","contributors_enabled":false,"is_translator":false,"profile_background_color":"F5F9FA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/777828765\/cd4e9f5c80f68c9fcc4c2ce034f12bfa.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/777828765\/cd4e9f5c80f68c9fcc4c2ce034f12bfa.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/3189383685\/6d1817619707aa73d37c445ee4386ed7_normal.gif","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/3189383685\/6d1817619707aa73d37c445ee4386ed7_normal.gif","profile_banner_url":"https:\/\/si0.twimg.com\/profile_banners\/475317811\/1359524106","profile_link_color":"F797F1","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"E6F6F9","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Thu Jan 31 23:59:12 +0000 2013","id":297131953872855040,"id_str":"297131953872855040","text":"siganos en https:\/\/t.co\/ZayRsVe2 damos FOLLOWBACK","source":"web","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":380562217,"id_str":"380562217","name":"CLARILANDIA :]","screen_name":"DouraPerfeccion","location":" \u2665 13 Meses \u2665","url":null,"description":"Ninguna medida de tiempo alcanzara para darte todo el amor que tengo para vos \u007b@claridouradinha \u007d \u2665 Juntas A La Par .","protected":false,"followers_count":484,"friends_count":662,"listed_count":0,"created_at":"Mon Sep 26 21:17:03 +0000 2011","favourites_count":54,"utc_offset":-10800,"time_zone":"Brasilia","geo_enabled":true,"verified":false,"statuses_count":4841,"lang":"es","contributors_enabled":false,"is_translator":false,"profile_background_color":"DBE9ED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/778698126\/887ed3ea965d02dee7be94a9cb848a41.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/778698126\/887ed3ea965d02dee7be94a9cb848a41.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/3153704359\/c1597a1efcc5a71901ff85c63b6bd46a_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/3153704359\/c1597a1efcc5a71901ff85c63b6bd46a_normal.jpeg","profile_banner_url":"https:\/\/si0.twimg.com\/profile_banners\/380562217\/1358801923","profile_link_color":"CC3366","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"E6F6F9","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1,"entities":{"hashtags":[],"urls":[{"url":"https:\/\/t.co\/ZayRsVe2","expanded_url":"https:\/\/twitter.com\/GoddesPyP","display_url":"twitter.com\/GoddesPyP","indices":[11,32]}],"user_mentions":[]},"favorited":false,"retweeted":true,"possibly_sensitive":false,"lang":"es"},"retweet_count":0,"entities":{"hashtags":[],"urls":[{"url":"https:\/\/t.co\/ZayRsVe2","expanded_url":"https:\/\/twitter.com\/GoddesPyP","display_url":"twitter.com\/GoddesPyP","indices":[32,53]}],"user_mentions":[{"screen_name":"DouraPerfeccion","name":"CLARILANDIA :]","id":380562217,"id_str":"380562217","indices":[3,19]}]},"favorited":false,"retweeted":false,"possibly_sensitive":true,"lang":"es"}



比如我想将这段数据中的id、name、followers_count等的值写入数据库中要如何实现?
...全文
259 2 打赏 收藏 举报
写回复
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
应该是json格式,CB中有json库可以直接解析
qq_41897817 2020-11-11
  • 打赏
  • 举报
回复
有多条这种数据
相关推荐
发帖
数据库及相关技术

1174

社区成员

C++ Builder 数据库及相关技术
社区管理员
  • 数据库及相关技术社区
加入社区
帖子事件
创建了帖子
2020-11-10 10:38
社区公告
暂无公告