/*----------------------------------------------------------------------------*/ /* Copyright (c) 2018 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ /*----------------------------------------------------------------------------*/ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import edu.wpi.cscore.VideoSource; import edu.wpi.first.cameraserver.CameraServer; import edu.wpi.first.networktables.NetworkTableInstance; /* JSON format: { "team": , "ntmode": <"client" or "server", "client" if unspecified> "cameras": [ { "name": "path": "pixel format": <"MJPEG", "YUYV", etc> // optional "width":