我有一本包含以下文字的字典:
{
"body": "Customer: \"I have a big problem. You cut off my head!\"\r\n\r\nme: \"I'm sorry? How did I cut off your head?\"\r\n\r\n(The customer shows me an obviously self-taken picture,with the top of his head removed.)\r\n\r\nme: \"Sir,it looks like it was taken that way.\"\r\n\r\nCustomer: \"No it wasn't! My whole head was there when I took it. I'm sure!\"\r\n\r\nme: \"Okay,let me see your memory card...\"\r\n\r\n(The customer hands it to me,and I go in the lab and pull it up on the computer. Sure enough,he chopped his own head off in the picture.)\r\n\r\nme: \"Sir,that is the whole image,and the top of your head isn't in it.\"\r\n\r\nCustomer: \"But it's DIGITAL,can't you fix it?\"\r\n\r\nme: \"You can't create something from nothing.\"\r\n\r\nCustomer: \"But... but... but... I need a photo for a dating website!\"\r\n\r\nme: \"Give me the camera and go stand over there.\"\r\n\r\nCustomer: *excited* \"Hot d***! You can be my best man!\"\r\n\r\nme: \"A thank you card will be enough.\"\r\n\r\n(Skip ahead 9 months...)\r\n\r\nFemale customer: \"Is your name ***?\"\r\n\r\nme: \"Yes,can I help you?\"\r\n\r\nFemale customer: \"My husband wanted you to have this.\" *hands me an envelope*\r\n\r\n(I open the envelope,and sure enough there's a thank you card with a picture of him and his wife. He actually got married and sent her in with the card!)","category": "Men / Women","id": 18189,"title": "A Heady Proposition"
},
但是我完全不确定如何解析body
的文本,以便可以从上面获取可读的文本。
我正在寻找一种通用的解决方案,而不是根据Customer
和Me
之类的关键字进行解析