private static function preprocessJsonPayload($payload) {

        $requests = [];

        $is_batch = false;

        if ( is_array($payload) ) {

            $is_batch = true;

            foreach ( $payload as $request ) $requests[] = self::preprocessJsonRequest($request);

        } else {

            $requests[] = self::preprocessJsonRequest($payload);

        }

        return array($is_batch, $requests);

    }