Comments (6)
This was fixed in several places before,
returning an empty array is possible.
On 21 oct 2015, at 12:40, Steffen Dienst [email protected] wrote:
If I create a dynamic shovel via pushing to /api/parameters/shovel with a publish-properties attribute like this
curl -i -u guest:guest -H "content-type:application/json" -XPUT
-d'{"value":{"dest-exchange":"amq.direct","src-queue":"test","dest-uri":"amqp://", "src-uri":"amqp://","publish-properties":{"user_id":"guest"}}}'
http://localhost:15672/api/parameters/shovel/%2f/test1
I can see at /api/parameters/shovel/%2f/test1 that the attribute publish-properties is a JSON object. If I instead create a queue with an empty publish-properties likecurl -i -u guest:guest -H "content-type:application/json" -XPUT
-d'{"value":{"dest-exchange":"amq.direct","src-queue":"test","dest-uri":"amqp://", "src-uri":"amqp://","publish-properties":{}}}'
http://localhost:15672/api/parameters/shovel/%2f/test1
the data type of this field is a JSON array instead. Is it possible to either not show the property or use an empty object?—
Reply to this email directly or view it on GitHub.
from rabbitmq-management.
You mean only an empty array? Not an empty object?
from rabbitmq-management.
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.
On 21 oct 2015, at 12:49, Steffen Dienst [email protected] wrote:
You mean only an empty array? Not an empty object?
—
Reply to this email directly or view it on GitHub.
from rabbitmq-management.
This belongs to shovel-management
but lets keep it here.
from rabbitmq-management.
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 3.6.x
, we will look at what we can do.
from rabbitmq-management.
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.
from rabbitmq-management.
Related Issues (20)
- unable to grant a user permissions to a custom topic via web ui HOT 2
- Add headers to HTTP logging HOT 2
- jquery 3.4.1 has security vulnerabilities and needs to be upgraded
- Make it possible to configure stats_event_max_backlog via new style format HOT 1
- Respect management.load_definitions for backwards compatibility
- UI fails to load with a ReferenceError: login_route is not defined in Firefox after an upgrade HOT 4
- Make it possible to configure rabbitmq_management.management_db_cache_multiplier via rabbitmq.conf
- When upgrading to a new version, JS is cached HOT 1
- Get Message can't deal unicode HOT 4
- Double encoded JSON payload 500s HOT 5
- Failed healthchecks return HTTP 200 status HOT 4
- UI: Policy definition with empty value not sent to API HOT 2
- Expose key individual health checks via HTTP API
- The 'unack' value is negative number HOT 2
- Disable HTTP OPTIONS method or make it configurable HOT 2
- unexpected_trailing_sections,{{'v1_0.delivery_annotations', HOT 1
- Missing confirm metrics from /api/exchanges/?message_stats HOT 2
- API request to aliveness-test when message-ttl is 0 results in a 500 HOT 1
- TLS listener port is reported incorrectly by `rabbitmq-diagnostics listeners` HOT 8
- Documentation: Example of Apache Reverse Proxy config does not work with 2.4+ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rabbitmq-management.