Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1.     ParsedLines[] FixParsedLines ( ParsedLines[] lines ) {
  2.         foreach ( ParsedLines line in lines ) {
  3.             line.text = line.text.Replace( "\r\n", " " );
  4.             line.text = line.text.Replace( "\n", " " );
  5.         }
  6.  
  7.         return lines;
  8.     }
  9.  
  10.     public string ParseAndSaveWebToolTexts(string apiResponse, string lessonId)
  11.     {
  12.         string errors = ParseCheckErrors(apiResponse);
  13.         if (!string.IsNullOrEmpty(errors)) return errors;
  14.  
  15.         ScenarioDataEntry scenario = JsonUtility.FromJson<ScenarioDataEntry>(apiResponse);
  16.  
  17.         var textLines = FixParsedLines( scenario.data.attributes.lines );
  18.         var participantsLines = scenario.data.attributes.participants;
  19.         var bundlesLines = scenario.data.attributes.asset_bundles;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement