Split an array of data and convert it to json form (ESP32)

Weight | Rate | PosX | PosY |
89.33 | 148.20 | 0.00 | 0.00
89.33 | 148.20 | 0.00 | 0.00
107.35 | 56.40 | 0.00 | 0.00
107.35 | 56.40 | 0.00 | 0.00
125.37 | 56.40 | 0.00 | 0.00
125.37 | 56.40 | 0.00 | 0.00
143.38 | 56.40 | 0.00 | 0.00
143.38 | 56.40 | 0.00 | 0.00
161.40 | 56.40 | 0.00 | 0.00
161.40 | 56.40 | 0.00 | 0.00
179.41 | 56.40 | 0.00 | 0.00
179.41 | 56.40 | 0.00 | 0.00
197.43 | 56.40 | 34.84 | 10.75
299.59 | 159.90 | 34.84 | 10.75
317.61 | 56.40 | 34.84 | 10.75
335.62 | 56.40 | 34.84 | 10.75
367.46 | 47.40 | 34.84 | 10.75
385.48 | 56.40 | 34.84 | 10.75
403.50 | 56.40 | 34.84 | 10.75
421.51 | 56.40 | 34.84 | 10.75
439.53 | 56.40 | 34.84 | 10.75
457.55 | 56.40 | 34.84 | 10.75
475.56 | 56.40 | 34.84 | 10.75
493.58 | 56.40 | 34.84 | 10.75
511.60 | 56.40 | 34.84 | 10.75

Here is how I do simple JSON:

Serial output directly into NodeRED - Arduino for STM32 (stm32duino.com)

No JSON library needed.

You could also write a little utility to read an SD card and spit JSON out serially.

Oh, welcome!

Ray

1 Like

I need just make it in JSON form exemple

{
    "Weight": 55.65 ,
    "Rate": 50,
    "PosX": 70,
    "PosY" : 69.63
   
 },
{
    "Weight": 75.15 ,
    "Rate": 55,
    "PosX": 25,
    "PosY" : 69.0

 },
 {
     "Weight":111.15 ,
    "Rate": 22,
    "PosX": 34.12,
    "PosY" : 10.1,

  },
 {
     "Weight": 150.15 ,
    "Rate": 60.42,
    "PosX": 34.12,
    "PosY" :10.11,
   }

Hi, have you seen this post ?

regards

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.