@@ -303,7 +303,8 @@ static int http_put(struct flb_out_doris *ctx,
303303
304304static int compose_payload (struct flb_out_doris * ctx ,
305305 const void * in_body , size_t in_size ,
306- void * * out_body , size_t * out_size )
306+ void * * out_body , size_t * out_size ,
307+ struct flb_config * config )
307308{
308309 flb_sds_t encoded ;
309310
@@ -314,7 +315,8 @@ static int compose_payload(struct flb_out_doris *ctx,
314315 in_size ,
315316 ctx -> out_format ,
316317 FLB_PACK_JSON_DATE_EPOCH ,
317- ctx -> date_key );
318+ ctx -> date_key ,
319+ config -> json_escape_unicode );
318320 if (encoded == NULL ) {
319321 flb_plg_error (ctx -> ins , "failed to convert json" );
320322 return FLB_ERROR ;
@@ -347,7 +349,7 @@ static void cb_doris_flush(struct flb_event_chunk *event_chunk,
347349 int len = 0 ;
348350
349351 ret = compose_payload (ctx , event_chunk -> data , event_chunk -> size ,
350- & out_body , & out_size );
352+ & out_body , & out_size , config );
351353
352354 if (ret != FLB_OK ) {
353355 if (ret == FLB_ERROR && ctx -> log_progress_interval > 0 ) {
@@ -463,7 +465,7 @@ static int cb_doris_format_test(struct flb_config *config,
463465 struct flb_out_doris * ctx = plugin_context ;
464466 int ret ;
465467
466- ret = compose_payload (ctx , data , bytes , out_data , out_size );
468+ ret = compose_payload (ctx , data , bytes , out_data , out_size , config );
467469 if (ret != FLB_OK ) {
468470 flb_error ("ret=%d" , ret );
469471 return -1 ;
0 commit comments