zhoujiexiong commented on issue #11440:
URL: https://github.com/apache/apisix/issues/11440#issuecomment-2257341733

   @wenhaoZhao1997 
   
   May be there is a quick workaround:
   (mainly to prevent ambiguity of JSON object/array for the frontend)
   
   1. set `no_default_values` pb_option of the plugin
      
https://apisix.apache.org/docs/apisix/plugins/grpc-transcode/#options-for-pb_option
   
      with the option, the empty array field would be presented like this:
      ```json
      {
          "items": {}
      }
      ```
      --->
      ```
      {}
      ```
   
      see also: 
https://github.com/starwing/lua-protobuf?tab=readme-ov-file#options
      auto_default_values(default) - act as `use_default_values` for `proto3` 
and act as `no_default_values` for the others 
      
   2. at the frontend, test the `items` field if `undefined` or not
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to