Search in sources :

Example 6 with DataFormatDetector

use of com.fasterxml.jackson.core.format.DataFormatDetector in project divolte-collector by divolte.

the class MincodeParserSamplesTest method testMincodeFormatDetector.

@Test
public void testMincodeFormatDetector() throws Exception {
    final DataFormatDetector detector = new DataFormatDetector(factory);
    final DataFormatMatcher format = detector.findFormat(this.sampleMincode.getBytes(StandardCharsets.UTF_8));
    assertEquals(factory.getFormatName(), format.getMatchedFormatName());
}
Also used : DataFormatDetector(com.fasterxml.jackson.core.format.DataFormatDetector) DataFormatMatcher(com.fasterxml.jackson.core.format.DataFormatMatcher) Test(org.junit.Test)

Aggregations

DataFormatDetector (com.fasterxml.jackson.core.format.DataFormatDetector)6 DataFormatMatcher (com.fasterxml.jackson.core.format.DataFormatMatcher)5 Test (org.junit.Test)2 JsonFactory (com.fasterxml.jackson.core.JsonFactory)1