import base64
import json


def _decode_json_base64(value):
    """Decodes a object that has been encoded with JSON then url-safe base64."""
    json_bytes = base64.urlsafe_b64decode(value)
    return json.loads(json_bytes.decode('utf-8'))