question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use snake_case in json body

See original GitHub issue

Now in mqtt messages are sent in a very strange json format, where all the fields are like raw data:

Publishing data to topic miScale/kektusini/weight: {"Weight":"83.65","BMI":"24.44","Basal Metabolism":"1733.59","Visceral Fat":"13.63","Lean Body Mass":"64.87","Body Fat":"23.41","Water":"52.54","Bone Mass":"3.27","Muscle Mass":"60.80","Protein":"20.15","Body Type":"Thick-set","Metabolic Age":"32","TimeStamp":"2020-07-03-15:54:09"}

Describe the solution you’d like It would be better to use the snake_case format to describe json fields:

{
   "weight":"83.65",
   "bmi":"24.44",
   "basal_metabolism":"1733.59",
   "visceral_fat":"13.63",
   "lean_body_mass":"64.87",
   "body_fat":"23.41",
   "water":"52.54",
   "bone_mass":"3.27",
   "muscle_mass":"60.80",
   "protein":"20.15",
   "body_type":"thick-set",
   "metabolic_age":"32",
   "timestamp":"2020-07-03-15:54:09"
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lolouk44commented, Jul 6, 2020

Thanks for your feedback. I don’t understand the issue here, as one would use the data from the MQTT topic and not read it, unless it’s for troubleshooting. Even then, the real troubleshooting issue would be to check whether the message is being sent or not… Or am I missing something?

0reactions
lolouk44commented, Sep 8, 2020

fixed in 0.1.8

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON Naming Convention (snake_case, camelCase or ...
There is no standard naming of keys in JSON and that camelCase or snake_case should work fine.
Read more >
Deserialize Snake Case to Camel Case With Jackson
In this article, we've seen different ways to deserialize snake case JSON to camel case fields using Jackson.
Read more >
How to accept and return snake case formatted JSON in ASP ...
First, you should create methods to convert property names to the Snake Case. We will use Newtonsoft.Json library feature for the task:.
Read more >
Parse Snake case JSON in Spring Boot | by Bhanu Chaddha
If you are consuming a REST service in Spring Boot , you are using Jackson Objectmapper to parse the JSON into Java Object...
Read more >
Snake-Case Parameters in Spring Boot REST Controllers
This allows Java and JavaScript programmers to use your API using the camel-case notation they're familiar with, and Python programmers can use ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found