Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- void example() throws IOException {
- String avroSchema = "{\n" +
- " \"type\": \"struct\",\n" +
- " \"name\": \"MatomoRecord\",\n" +
- " \"fields\": [\n" +
- " {\"field\": \"name\", \"type\": \"string\"},\n" +
- " {\"field\": \"type\", \"type\": \"string\"},\n" +
- " {\"field\": \"timestamp\", \"type\": \"int64\"}\n" +
- " ]\n" +
- "}";
- JsonConverter jsonConverter = new JsonConverter();
- jsonConverter.configure(new HashMap<>(), false);
- jsonConverter.asConnectSchema(new ObjectMapper().readTree(avroSchema));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement