<commit_before># fluent-plugin-partial-json-parser

Fluentd ouput plugin to parse value with a JSON structure partial

## Installation

Add this line to your application's Gemfile:

    gem 'fluent-plugin-partial-json-parser'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install fluent-plugin-partial-json-parser

## Usage

Now. Assuming that we have a below stream,

```
2014-05-28 12:18:30 +0900 test.out {"foo": 2, "bar": "b", "buz": "{\"a\":{\"b\":\"message\"},\"id\":20}"}
```

if describe config as below,

```
<match test.out>
    type partial_json_parser
    remove_tag_prefix test
    add_tag_prefix reemit
    keys buz,no_field
</match>
```

output a below stream.

```
2014-05-28 12:18:30 +0900 reemit {"foo": 2, "bar": "b", "buz": {"a": {"b": "message"}, "id": 20}}
```

## Options<commit_msg>Fixed document<commit_after># fluent-plugin-partial-json-parser

Fluentd ouput plugin to parse value with a JSON structure partial

## Installation

Add this line to your application's Gemfile:

    gem 'fluent-plugin-partial-json-parser'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install fluent-plugin-partial-json-parser

## Usage

Now. Assuming that we have a below stream,

```
2014-05-28 12:18:30 +0900 test.out {"foo": 2, "bar": "b", "buz": "{\"a\":{\"b\":\"message\"},\"id\":20}"}
```

if describe config as below,

```
<match test.out>
    type partial_json_parser
    remove_tag_prefix test
    add_tag_prefix reemit
    keys buz,no_field
</match>
```

output a below stream.

```
2014-05-28 12:18:30 +0900 reemit.out {"foo": 2, "bar": "b", "buz": {"a": {"b": "message"}, "id": 20}}
```

## Options
{'fraction_non_alphanumeric': 0.170760934691432, 'fraction_numerical': 0.05032953864589575, 'mean_word_length': 3.8126801152737753, 'pattern_counts': {'":': 24, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2289407', 'n_tokens_mistral': 664, 'n_tokens_neox': 589, 'n_words': 178}