Python Forum
how do I format json data in splunk?
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how do I format json data in splunk?
#10
Replace
try: reader = results.ResultsReader(response)
except: print(sys.exc_info())
with
reader = results.ResultsReader(response)
The exception handling doesn't make sense, the program needs to exit if any exception occurs because the variable won't be defined (as the error message says). If you let the exception be thrown, you should get some information that will help with identifying the root issue.
Reply


Messages In This Thread
how do I format json data in splunk? - by fxtyom - May-04-2017, 04:30 PM
RE: how do I format json data in splunk? - by micseydel - May-24-2017, 08:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  encrypt data in json file help jacksfrustration 1 534 Mar-28-2024, 05:16 PM
Last Post: deanhystad
  Export data from PDF as tabular format zinho 5 917 Nov-11-2023, 08:23 AM
Last Post: Pedroski55
  format json outputs ! evilcode1 3 1,882 Oct-29-2023, 01:30 PM
Last Post: omemoe277
  How to properly format rows and columns in excel data from parsed .txt blocks jh67 7 2,220 Dec-12-2022, 08:22 PM
Last Post: jh67
  Read nested data from JSON - Getting an error marlonbown 5 1,612 Nov-23-2022, 03:51 PM
Last Post: snippsat
  Convert Json to table format python_student 2 6,505 Sep-28-2022, 12:48 PM
Last Post: python_student
  Reading Data from JSON tpolim008 2 1,253 Sep-27-2022, 06:34 PM
Last Post: Larz60+
  Issue in changing data format (2 bytes) into a 16 bit data. GiggsB 11 2,952 Jul-25-2022, 03:19 PM
Last Post: deanhystad
  Converting cells in excel to JSON format desmondtay 4 1,915 May-23-2022, 10:31 AM
Last Post: Larz60+
  Convert nested sample json api data into csv in python shantanu97 3 3,159 May-21-2022, 01:30 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