@Override
    protected Result[] run(String value) {
        final Map<String, Object> extractedJson;
        try {
            extractedJson = extractJson(value);
        } catch (IOException e) {
            throw new ExtractorException(e);
        }
        final List<Result> results = new ArrayList<>(extractedJson.size());
        for (Map.Entry<String, Object> entry : extractedJson.entrySet()) {
            results.add(new Result(entry.getValue(), entry.getKey(), -1, -1));
        }

        return results.toArray(new Result[results.size()]);
    }
@Test
    public void testRunWithFlattenedObjectAndDifferentKVSeparator() throws Exception {
        final JsonExtractor jsonExtractor = new JsonExtractor(new MetricRegistry(), "json", "title", 0L, Extractor.CursorStrategy.COPY,
                "source", "target", ImmutableMap.<String, Object>of("flatten", true, "kv_separator", ":"), "user", Collections.<Converter>emptyList(), Extractor.ConditionType.NONE,
                "");
        final String value = "{\"object\": {\"text\": \"foobar\", \"number\": 1234.5678, \"bool\": true, \"nested\": {\"text\": \"foobar\"}}}";
        final Extractor.Result[] results = jsonExtractor.run(value);

        assertThat(results).contains(
                new Extractor.Result("text:foobar, number:1234.5678, bool:true, nested:{text=foobar}", "object", -1, -1)
        );
    }