Validate JSON

Check if a string is valid JSON.

Code

General
import json
try:
    json.loads(str)
    result = True
except:
    result = False
return result

Parameters

The string to validate as JSON

Server

More Python Snippets