import json


def _is_valid_work_order_json(work_order_id, worker_id, requester_id,
                              work_order_request):
    """
    Validate the following fields in a JSON request against the ones
    provided outside the JSON: work_order_id, worker_id, and requester_id.

    Parameters:
    work_order_id      Unique ID of the work order request
    worker_id          Identifier for the worker
    requester_id       Unique id to identify the requester
    work_order_request JSON RPC string work order request.
                       Complete definition at work_order.py and
                       defined in EEA specification 6.1.1.

    Returns:
    True on success and False on error.
    """
    json_request = json.loads(work_order_request)
    if (work_order_id == json_request.get("workOrderId")
            and worker_id == json_request.get("workerId")
            and requester_id == json_request.get("requesterId")):
        return True
    else:
        return False