import json


def dj(_dict):
    """Converts dicts to JSON and safely handles non-serializable items"""
    return json.dumps(
        _dict,
        default=lambda o: 'ERROR: Item not JSON serializable',
        sort_keys=True,
        indent=3)