Create new job api error "MALFORMED_REQUEST"

tum
New Contributor II

hi,

i'm trying to test create a new job api (v 2.1) with python, but i got error:

{ 'error_code': 'MALFORMED_REQUEST',

 'message': 'Invalid JSON given in the body of the request - expected a map'}

How do i validate json body before posting ?

this is my json

 {
            "name": "testing job",
            "new_cluster": {
                "spark_version": "7.3.x-scala2.12",
                "node_type_id": "r3.xlarge",
                "aws_attributes": {
                "availability": "ON_DEMAND"
                },
                "num_workers": 10
            },
            "email_notifications": {
                "on_start": [],
                "on_success": [],
                "on_failure": []
            },
            "timeout_seconds": 3600,
            "max_retries": 1,
            "schedule": {
                "quartz_cron_expression": "0 15 22 * * ?",
                "timezone_id": "America/Los_Angeles"
            }
}