private static String[] parseJson(String[] args) {
        StringBuilder lastStr = new StringBuilder();
        try {
            try (FileInputStream fileInputStream = new FileInputStream(args[0])) {
                try (InputStreamReader inputStreamReader =
                             new InputStreamReader(fileInputStream, StandardCharsets.UTF_8)) {
                    try (BufferedReader reader = new BufferedReader(inputStreamReader)) {
                        String tempString;
                        while ((tempString = reader.readLine()) != null) {
                            lastStr.append(tempString);
                        }
                    }
                }
            }
        } catch (IOException e) {
            LOG.error("", e);
        }

        Map<String, Object> map = JSON.parseObject(lastStr.toString(), new TypeReference<Map<String, Object>>() {});
        List<String> list = new LinkedList<>();

        for (Map.Entry<String, Object> entry : map.entrySet()) {
            list.add("-" + entry.getKey());
            list.add(entry.getValue().toString());
        }
        return list.toArray(new String[0]);
    }
Date: 2017/2/20
Company: www.dtstack.com
@author xuchao
launcher/src/main/java/com/dtstack/flink/sql/launcher/LauncherMain.java