-
Notifications
You must be signed in to change notification settings - Fork 165
Wrong JSON data type for empty publish-properties
in /api/parameters/shovel
#75
Comments
This was fixed in several places before,
|
You mean only an empty array? Not an empty object? |
An empty object, sorry. The issue here is that proplists are lists in Erlang and so empty proplists are serialised as empty lists unless mochijson2 is instructed otherwise.
|
This belongs to |
We've evaluated this and there is an issue with Erlang JSON libraries prior to 17.x: they use lists to express what is objects in JSON. So we can't reliably tell an empty list from an empty object. In master we will switch to maps. For |
Just sent two PRs with a proposal for a fix for this on stable. It's dirty really, and I have not run the full test suites to make sure I didn't break anything. Looking to see if that sort of fix is OK. |
If I create a dynamic shovel via pushing to
/api/parameters/shovel
with apublish-properties
attribute like thisI can see at
/api/parameters/shovel/%2f/test1
that the attributepublish-properties
is a JSON object. If I instead create a queue with an emptypublish-properties
likethe data type of this field is a JSON array instead. Is it possible to either not show the property or use an empty object?
The text was updated successfully, but these errors were encountered: