@@ -0,0 +1,1628 @@
+%0A// Copyright 2019 Google LLC%0A//%0A// Licensed under the Apache License, Version 2.0 (the %22License%22);%0A// you may not use this file except in compliance with the License.%0A// You may obtain a copy of the License at%0A//%0A//     https://www.apache.org/licenses/LICENSE-2.0%0A//%0A// Unless required by applicable law or agreed to in writing, software%0A// distributed under the License is distributed on an %22AS IS%22 BASIS,%0A// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A// See the License for the specific language governing permissions and%0A// limitations under the License.%0Apackage data;%0A%0Aimport java.io.File;%0Aimport java.io.FileWriter;%0Aimport java.io.BufferedWriter;%0Aimport java.io.IOException;%0Aimport java.util.ArrayList;%0Aimport org.json.JSONObject;%0A%0A/** A class that creates a config file from a Vendor object. */%0Apublic class JsonConverter %7B%0A  private static final String FILE_PATH_BASE = %22data/%22;%0A  %0A  public File createFile() %7B%0A    String fileName = FILE_PATH_BASE + %22practiceFile%22;%0A%0A    // Create a JSON object to write to the file.%0A    JSONObject parentObject = new JSONObject();%0A    JSONObject JSONCar = new JSONObject();%0A    JSONCar.put(%22Car%22, %22Blue Tacoma%22);%0A    parentObject.put(%22Vehicle%22, JSONCar);%0A%0A    // Write the JSON object to the file.%0A    File file = null;%0A    try %7B%0A      file = new File(fileName);%0A      BufferedWriter out = new BufferedWriter(new FileWriter(file));%0A      out.write(parentObject.toString());%0A      out.close();%0A    %7D catch(IOException e) %7B%0A      return null;%0A    %7D %0A%0A    return file;%0A  %7D%0A%0A  public boolean updateFile(Vendor vendor) %7B%0A    createFile();%0A    return true;%0A  %7D%0A%7D

create JsonConverter class to make a file of JSON objects