Hi I am converting JSON data into String. Please find the JSON data below. I am facing an issue where in the system is unable to convert NULL values into string. Therefore, I am getting the following error: can't convert nil into String (TypeError)
JSON DATA:
{"success":true,"message":null,"data":null}
Code Used:
c = Curl::Easy.new(Configuration.fetch("<URL where we can find the above JSON DATA and nothing else>"))
# c.follow_location = true
# c.http_auth_types = :basic
# c.username = Configuration.fetch('auth_user', false)
# c.password = Configuration.fetch('auth_pass', false)
# c.headers["User-Agent"] = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17'
# c.perform
result=JSON.parse(c)
puts result["Success"]
Please help.