the following complete code, I am now writing a json, in which boundingBox corresponds to four angular coordinates, how to parse those four coordinates and assign values to the following canvas to draw four points of the rectangle, so that the background gives different json coordinates and draws different rectangles. Should canvas be encapsulated as a function? I think the canvas rectangles encapsulated on the Internet are filled with width and height, not coordinates.
<!DOCTYPE html>   
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="css/default.css">
    <link rel="stylesheet" href="css/upload.css">
    <title>Document</title>
</head>
<body>
<div class="container">
    <div class="title">
        
    </div>
    <div class="txt">
        <span></span>
    </div>
    <div class="content">
        <div id="left">
            <div class="img-box">
                <canvas id="cvs"></canvas>
            </div> 
            <a href="" id="jump">
                
                <input type="file" id="chooseImage" name="file" accept="image/*">
            </a>  
        </div>
        <div class="right">
            <div class="tabs">
                <div>
                    <input type="radio" id="r-1" name="tab" checked>
                    <label for="r-1" class="label-1"></label>
                    <div class="mod-1">
                            <table border="0" cellspacing="0">
                            <thead>
                                <tr>
                                    <th rowspan="2" class="result-num"></th>
                                    <th rowspan="2" class="result-content"></th>
                                    <th colspan="4">
                                        
                                    </th>
                                </tr>
                                <tr>
                                    <th></th>
                                    <th></th>
                                    <th></th>
                                    <th></th>
                                </tr>
                            </thead>
                            <tbody>
                                <!--  -->
                            </tbody>
                        </table>          
                    </div>
                </div>       
                <div>
                    <input type="radio" id="r-2" name="tab">
                    <label for="r-2" class="label-2">JSON</label>
                    <div class="mod-2">
                        <pre class="result">