Use snake_case in json body
See original GitHub issueNow 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:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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?
fixed in 0.1.8