Question: PYTHON: Write a function, named sum _ all _ JSON _ numbers that takes a string with a JSON object as its contents. The function

PYTHON: Write a function, named sum_all_JSON_numbers that takes a string with a JSON object as its contents. The function should return the sum of every JSON number in the string.
Example
input_string ='{"name":"josh", "age":31, "instructor":true, "degree dates": [2005,2006,2013], "pets":["CrashDown", "Ghost", "RaceTrack", "Dany"]}'
result = sum_all_JSON_numbers(input_string) # should be 6055

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!