fluent-bit-docs
fluent-bit-docs copied to clipboard
Document difference of JSON formats
Behavior of json, json_stream and json_lines should be documented. Related comments in code:
https://github.com/fluent/fluent-bit/blob/v1.4.2/src/flb_pack.c#L745-L754 https://github.com/fluent/fluent-bit/blob/v1.4.2/src/flb_pack.c#L820-L833
/*
* If the format is the original msgpack style of one big array,
* registrate the array, otherwise is not necessary. FYI, original format:
*
* [
* [timestamp, map],
* [timestamp, map],
* [T, M]...
* ]
*/
;
/*
* Here we handle two types of records concatenation:
*
* FLB_PACK_JSON_FORMAT_LINES: add breakline (\n) after each record
*
*
* {'ts':abc,'k1':1}
* {'ts':abc,'k1':2}
* {N}
*
* FLB_PACK_JSON_FORMAT_STREAM: no separators, e.g:
*
* {'ts':abc,'k1':1}{'ts':abc,'k1':2}{N}
*/