synchronized public void WriteRequestsData( ){

        try{

            FileWriter fstream = new FileWriter("/usr/local/tomcat/webapps/imagestuck/data.json");
            BufferedWriter out = new BufferedWriter(fstream);
            out.write("{\n   \"label\": \"Monthly Image Edits \",");
            String data = "";
            if(Month == 0 || Month == 2 || Month == 4 || Month == 6 || Month == 7 || Month == 9 || Month == 11){
                for (int i = 1; i < 32 ; i++){
                    if ( i == 31){

                        data += "[" + i + "," + TotalMonthEdits[i] + "]";
                    } 
                    else {
                        data += "[" + i + "," + TotalMonthEdits[i] + "],";
                    }

                }
            }
            else if(Month == 1){
                for (int i = 1; i < 29 ; i++){
                    if ( i == 28){

                        data += "[" + i + "," + TotalMonthEdits[i] + "]";
                    } 
                    else {
                        data += "[" + i + "," + TotalMonthEdits[i] + "],";
                    }

                }
            }
            else if(Month == 3 || Month == 5 || Month == 8 || Month == 10){
                for (int i = 1; i < 31 ; i++){
                    if ( i == 30){

                        data += "[" + i + "," + TotalMonthEdits[i] + "]";
                    } 
                    else {
                        data += "[" + i + "," + TotalMonthEdits[i] + "],";
                    }

                }
            }
            out.write("\n\"data\":[" + data + "]\n}");
            out.close();
        }
        catch (Exception e){
            
            System.err.println("Error: " + e.getMessage());
            
        }
    }