Python Forum
How can i parse a log file to JSON.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can i parse a log file to JSON.
#3
the expected output you show is not JSON, show what you expect as output. It may be ndjson, but it uses single quotes
otherwise parse the log file and identify separate records - it looks easy task - either by reading and analyzing each line or using regex
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: How can i parse a log file to JSON. - by buran - May-26-2020, 10:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  encrypt data in json file help jacksfrustration 1 332 Mar-28-2024, 05:16 PM
Last Post: deanhystad
  parse json field from csv file lebossejames 4 835 Nov-14-2023, 11:34 PM
Last Post: snippsat
  parse/read from file seperated by dots giovanne 5 1,191 Jun-26-2023, 12:26 PM
Last Post: DeaD_EyE
  Python Script to convert Json to CSV file chvsnarayana 8 2,656 Apr-26-2023, 10:31 PM
Last Post: DeaD_EyE
  Loop through json file and reset values [SOLVED] AlphaInc 2 2,296 Apr-06-2023, 11:15 AM
Last Post: AlphaInc
  [split] Parse Nested JSON String in Python mmm07 4 1,633 Mar-28-2023, 06:07 PM
Last Post: snippsat
  Converting a json file to a dataframe with rows and columns eyavuz21 13 4,911 Jan-29-2023, 03:59 PM
Last Post: eyavuz21
  validate large json file with millions of records in batches herobpv 3 1,342 Dec-10-2022, 10:36 PM
Last Post: bowlofred
  Writing to json file ebolisa 1 1,065 Jul-17-2022, 04:51 PM
Last Post: deanhystad
  Trying to parse only 3 key values from json file cubangt 8 3,592 Jul-16-2022, 02:05 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020