[
    {
        "description": "validation of string-encoded content based on media type",
        "schema": {
            "contentMediaType": "application/json"
        },
        "tests": [
            {
                "description": "a valid JSON document",
                "data": "{\"foo\": \"bar\"}",
                "valid": true
            },
            {
                "description": "an invalid JSON document",
                "data": "{:}",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of binary string-encoding",
        "schema": {
            "contentEncoding": "base64"
        },
        "tests": [
            {
                "description": "a valid base64 string",
                "data": "eyJmb28iOiAiYmFyIn0K",
                "valid": true
            },
            {
                "description": "an invalid base64 string (% is not a valid character)",
                "data": "eyJmb28iOi%iYmFyIn0K",
                "valid": false
            }
        ]
    },
    {
        "description": "validation of binary-encoded media type documents",
        "schema": {
            "contentMediaType": "application/json",
            "contentEncoding": "base64"
        },
        "tests": [
            {
                "description": "a valid base64-encoded JSON document",
                "data": "eyJmb28iOiAiYmFyIn0K",
                "valid": true
            },
            {
                "description": "a validly-encoded invalid JSON document",
                "data": "ezp9Cg==",
                "valid": false
            },
            {
                "description": "an invalid base64 string that is valid JSON",
                "data": "{}",
                "valid": false
            }
        ]
    }
]
