开发者

extract specific text from data

开发者 https://www.devze.com 2023-02-25 04:18 出处:网络
I have below text and I want to extract Comment allez-vous from below text how do I extract using C# ?. This text will be different 开发者_运维技巧all the time. rest of the data format is the same.

I have below text and I want to extract Comment allez-vous from below text how do I extract using C# ?. This text will be different 开发者_运维技巧all the time. rest of the data format is the same.

handleResponse({
 "data": {
  "translations": [
   {
    "translatedText": "Comment allez-vous"
   }
  ]
 }
}
);


It's JSON. Use a JSON parser for .Net like JSON.NET or the JavaScriptSerializer


  1. Look for last index of ". index A

  2. Find first index for translatedText + length of translatedText +1. index B

  3. fetch all string betwee B and A.

0

精彩评论

暂无评论...
验证码 换一张
取 消