Getting an issue while converting .txt file to .json

Hi

i have .txt file(log file) and i am trying to convert this .txt file to .json but it was showing below error.
any one knows about this issue,
also how can i create a simple log file in Json format?Log%20messages

Hi @sunilraju

Read the text file and then deserialize json activity and then pass it through for each item in string json

Thanks
Ashwin.S

below is my sample log data,
09/22/2019 18:12:04Read Time Sheet Details
09/22/2019 Logged In Successfully
09/22/2019 Clicked On Time & Expenses Successfully
09/22/2019 Clicked On My TimeSheets Successfully
09/22/2019 18:12:24 Data Extracted From Table Successfully
Description: Edit
View
BeginDate: 09/15/2019
EndDate: 09/21/2019
State: Submitted
Print: Print
Duplicate: Duplicate
Description: Edit
View
BeginDate: 09/08/2019
EndDate: 09/14/2019
State: Partially Approved
Print: Print
Duplicate: Duplicate
Description: Edit
View
BeginDate: 09/01/2019
EndDate: 09/07/2019
State: Partially Approved
Print: Print
Duplicate: Duplicate
Description: Edit
View
BeginDate: 08/25/2019
EndDate: 08/31/2019
State: Partially Approved
Print: Print
Duplicate: Duplicate
Description: Edit
View
BeginDate: 08/18/2019
EndDate: 08/24/2019
State: Partially Approved
Print: Print
Duplicate: Duplicate
Description: Edit
View
BeginDate: 08/11/2019
EndDate: 08/17/2019
State: Partially Approved
Print: Print
Duplicate: Duplicate
Description: Edit
View
BeginDate: 08/04/2019
EndDate: 08/10/2019
State: Partially Approved
Print: Print
Duplicate: Duplicate
Description: Edit
View
BeginDate: 07/28/2019
EndDate: 08/03/2019
State: Partially Approved
Print: Print
Duplicate: Duplicate
Description: Edit
View
BeginDate: 07/21/2019
EndDate: 07/27/2019
State: Partially Approved
Print: Print
Duplicate: Duplicate
Description: Edit
View
BeginDate: 07/14/2019
EndDate: 07/20/2019
State: Approved
Print: Print
Duplicate: Duplicate
Description: Edit
View
BeginDate: 07/07/2019
EndDate: 07/13/2019
State: Approved
Print: Print
Duplicate: Duplicate
Description: Edit
View
BeginDate: 06/30/2019
EndDate: 07/06/2019
State: Partially Approved
Print: Print
Duplicate: Duplicate
Description: Edit
View
BeginDate: 06/23/2019
EndDate: 06/29/2019
State: Partially Approved
Print: Print
Duplicate: Duplicate
Description: Edit
View
BeginDate: 06/16/2019
EndDate: 06/22/2019
State: Partially Approved
Print: Print
Duplicate: Duplicate

while deserializing i am below error called,
RemoteException wrapping Newtonsoft.Json.JsonReaderException: Input string ‘09’ is not a valid number. Path ‘’,
line 1,
position 2. —> RemoteException wrapping System.FormatException: Additional non-parsable characters are at the end of the string.
at System.ParseNumbers.StringToLong(String s,
Int32 radix,
Int32 flags,
Int32* currPos)
at System.Convert.ToInt64(String value,
Int32 fromBase)
at Newtonsoft.Json.JsonTextReader.ParseReadNumber(ReadType readType,
Char firstChar,
Int32 initialPosition)
— End of inner exception stack trace —
at Newtonsoft.Json.JsonTextReader.ParseReadNumber(ReadType readType,
Char firstChar,
Int32 initialPosition)
at Newtonsoft.Json.JsonTextReader.ParseNumber(ReadType readType)
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Linq.JArray.Load(JsonReader reader,
JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JArray.Parse(String json,
JsonLoadSettings settings)
at UiPath.Web.Activities.DeserializeJsonArray.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance,
ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor,
BookmarkManager bookmarkManager,
Location resultLocation)…

Any idea. How to resolve this.

Heyyyy @sunilraju ,

That is pure text, you are trying to convert it to Json right?

Then you need to be sure that where do the object starts and ends and ofcourse how many objects are there in the entire string