piwebasync/api/util.py
def json_load_content(content: bytes) -> JSONType:
    """
    Escapes paths returned by Pi Web API so they can loaded as JSON
    """
    content.replace('\\', '\\\\')
    try:
        return orjson.loads(bytes(content, 'utf-8'))
    except json.JSONDecodeError:
        return {}

    Escapes paths returned by Pi Web API so they can loaded as JSON
    
Escapes paths returned by Pi Web API so they can loaded as JSON
Escapes paths returned by Pi Web API so they can loaded as JSON
def json_load_content(content: bytes) -> JSONType:
    content.replace('\\', '\\\\')
    try:
        return orjson.loads(bytes(content, 'utf-8'))
    except json.JSONDecodeError:
        return {}
def json_load_content ( content : bytes ) -> JSONType : content . replace ( '\\' , '\\\\' ) try : return orjson . loads ( bytes ( content , 'utf-8' ) ) except json . JSONDecodeError : return { }
Escapes paths returned by Pi Web API so they can loaded as JSON
Escapes paths returned by Pi Web API so they can loaded as JSON
"""
    Escapes paths returned by Pi Web API so they can loaded as JSON
    """
content
bytes