Is there a way to get a json or Java object out of an byte stream?
If the structure in the plc looks like that
Data
- id int
- pos array[0..3] of int
- time dint
id=5
pos[0]=1
pos[1]=2
pos[2]=3
pos[3]=4
time = 5
I would get a bytearray of [0,5,0,1,0,2,0,3,0,4,0,0,0,5]
Now I want a Json out of this like
{
id:5,
pos:[1,2,3,4],
time:5
}
The Deserialization Process needs to know the Datatypes
and the Array lengths
. Is there any framework which supports things like that?