fluent-plugin-text_to_json 0.1.51 → 0.1.52
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fluent/plugin/formatter_text_to_json.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 075ff842367471a91a10be8d2f474ac245eb32d3
|
4
|
+
data.tar.gz: 04006ab6154ba69463a8e19b075f93407ae287b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b1eb2b6b34c355f68ccfdadb34e52be075bf3d6d361b219c02454b0fb592f8f074e70fbf94a64552e1889ebf2e3224b65a77c701d05391d84701b23c57e5b4a
|
7
|
+
data.tar.gz: e867da9814294d25f15443dfde1cfe06b57310e019bfc9a500f3393a5aba9acacd65c54c060b733ccbfc95cb72a640b6d21518a377a326abbc261fc362dba88b
|
@@ -24,10 +24,12 @@ module Fluent
|
|
24
24
|
#sdr parameters to json format
|
25
25
|
tmp_field[0] = tmp_field[0].split("\\n")
|
26
26
|
tmp_field[0] = tmp_field[0].map{|value| (value == "")? nil:value} # HBase plugin ignores nil values
|
27
|
-
tmp_field[0] = tmp_field[0].map{|value| (value == nil)?
|
27
|
+
tmp_field[0] = tmp_field[0].map{|value| (value == nil)? nil:"\""+value+"\""}
|
28
28
|
|
29
29
|
tmp_field[0] = @fields[2,14].zip(tmp_field[0])
|
30
|
-
tmp_field[0] = tmp_field[0].map{|
|
30
|
+
tmp_field[0] = tmp_field[0].map{|field, value|
|
31
|
+
new_value = (value==nil)? "null":value
|
32
|
+
fielt+":"+new_value}.join(",")
|
31
33
|
|
32
34
|
|
33
35
|
#factor paramters to json format
|