lensesio / kafka-topics-ui

Web Tool for Kafka Topics |
https://lenses.io
877 stars 148 forks source link

fix(dataThreeView): Try to convert to JSON value to have nice UI pres… #138

Closed corentinmarciadvize closed 5 years ago

corentinmarciadvize commented 6 years ago

The facts

Currently, when we have Kafka messages with a key as string and a value as JSON object, the UI display the value as a string.

The reason

The front-end app, first try to get an avro formatted response from kafka-rest if not available ask for a JSON formatted response and finally if JSON not available ask for binary response.

The problem is when we ask kafka-rest a JSON formatted response and the key of our messages are not object but strings, kafka-rest reject the call. So front-end app fallback to binary call but the result is that the value of our messages are returned as string and so not well displayed in the UI. (not openable)

The fix

Try to convert the value of messages into JSON object if they are typeof string.


This change is Reviewable

jglambed commented 5 years ago

@corentinmarciadvize I have not much to say for this 6 months delay, thank you for the pull request, awesome work!