public static <T> T objectFromCommandLineArgument(String argument, Class<T> clazz) throws Exception {
        if (openBraceComesFirst(argument)) {
            return JSON_SERDE.readValue(argument, clazz);
        } else {
            return JSON_SERDE.readValue(new File(argument), clazz);
        }
    }
@Test
    public void testObjectFromCommandLineArgument() throws Exception {
        assertEquals(123, JsonUtil.objectFromCommandLineArgument("{\"bar\":123}", Foo.class).bar);
        assertEquals(1, JsonUtil.objectFromCommandLineArgument("   {\"bar\": 1}   ", Foo.class).bar);
        File tempFile = TestUtils.tempFile();
        try {
            Files.write(tempFile.toPath(), "{\"bar\": 456}".getBytes(StandardCharsets.UTF_8));
            assertEquals(456, JsonUtil.objectFromCommandLineArgument(tempFile.getAbsolutePath(), Foo.class).bar);
        } finally {
            Files.delete(tempFile.toPath());
        }
    }