Prettify JSON

Format JSON with proper indentation for improved readability and debugging.

Code

Utilities
import json
return json.dumps(json.loads(jsonStr), indent=indent)

Parameters

JSON string to format.

Number of spaces for indentation.

Server

More Python Snippets