Post by brouwyka on JSONByteArrayWriter string result incorrect order
CODESYS Forge
talk
(Post)
Additional note: When doing all additions to a JSON array one after another without additions outside the array inbetween (and no more additions to the array after an item outside the array has been added) - which is not a viable solution for us as we might add items to any of the arrays at any time, but we tested regardless to be thorough - we get the following result: { "id": "machine_1", "readings": [ { "temp_mid": 153.8 }, { "temp_mid": 98.3 } ], "status": "RUNNING" } This mostly matches our expected outcome, aside from the JSONByteArrayWriter not adding indenting before closing square brackets ("]") at all. That doesn't matter for JSON of course, as it's not sensitive to indenting, but it's still a bug regardless. Also, it adds an unnecessary newline between items in the array (at least when having an array of objects, we haven't tested with arrays of primitives). I also want to reiterate that this is not a viable workaround for the issue for us - we have to be able to add to any array at any time, which should be possible according to the docs, and we are 100% sure indexes are correctly being managed and built up by the JSONBuilder and our wrapper (to track the index of each array & the latest item added to each exactly to make use of the documented possibility to add anything anywhere in the JSON at any time as long as you keep track of the returned indexes) around it.
Last updated: 2026-06-10
Comments in arrays and assigning RST coil's to 600 outputs
CODESYS Forge
talk
(Thread)
Comments in arrays and assigning RST coil's to 600 outputs
Last updated: 2023-08-31
How to use MC_Home and Configure Task
CODESYS Forge
talk
(Thread)
How to use MC_Home and Configure Task
Last updated: 2018-04-20
PFC 200 memory gets full and hangs
CODESYS Forge
talk
(Thread)
PFC 200 memory gets full and hangs
Last updated: 2020-04-05
General question about Codesys and control RTE
CODESYS Forge
talk
(Thread)
General question about Codesys and control RTE
Last updated: 2020-01-27
A few quick Ethernet/IP and ModBus questions
CODESYS Forge
talk
(Thread)
A few quick Ethernet/IP and ModBus questions
Last updated: 2021-02-22
raspberry pi B+ GPIO 5 and 6 always TRUE
CODESYS Forge
talk
(Thread)
raspberry pi B+ GPIO 5 and 6 always TRUE
Last updated: 2016-10-07
Scaling Problems mit Visualization and iPAD Pro Safari
CODESYS Forge
talk
(Thread)
Scaling Problems mit Visualization and iPAD Pro Safari
Last updated: 2022-06-01
Encryption of application and communication not working
CODESYS Forge
talk
(Thread)
Encryption of application and communication not working
Last updated: 2021-11-04
Running and A-axis smoothly at constant velocity
CODESYS Forge
talk
(Thread)
Running and A-axis smoothly at constant velocity
Last updated: 2016-01-22
Using it with beckhoff CX9020 and getting PLC disconnections
CODESYS Forge
talk
(Thread)
Using it with beckhoff CX9020 and getting PLC disconnections
Last updated: 2013-09-09
Low latency communication between raspberry pi and arduino
CODESYS Forge
talk
(Thread)
Low latency communication between raspberry pi and arduino
Last updated: 2019-06-09
Did a library update and now can't open project
CODESYS Forge
talk
(Thread)
Did a library update and now can't open project
Last updated: 2023-09-25
Initialization of visualization variables and cyclic code execution
CODESYS Forge
talk
(Thread)
Initialization of visualization variables and cyclic code execution
Last updated: 2023-10-01
Threads and TID created by CODESYSControl Win V3
CODESYS Forge
talk
(Thread)
Threads and TID created by CODESYSControl Win V3
Last updated: 2023-10-02
How to switch between dynamic IP address and dynamic?
CODESYS Forge
talk
(Thread)
How to switch between dynamic IP address and dynamic?
Last updated: 2023-11-08
Codesys Raspberry Runtime 4.10.0.0 and RSM Utility 3.5.19.0
CODESYS Forge
talk
(Thread)
Codesys Raspberry Runtime 4.10.0.0 and RSM Utility 3.5.19.0
Last updated: 2023-11-21
About byte swap and convert into 16 bits
CODESYS Forge
talk
(Thread)
About byte swap and convert into 16 bits
Last updated: 2023-12-04
Alarm Management - Import and Export of AlarmGroup
CODESYS Forge
talk
(Thread)
Alarm Management - Import and Export of AlarmGroup
Last updated: 2023-12-06
ScriptEngine - execute "Export -> Bootproject and firmware (SD Card)" from python
CODESYS Forge
talk
(Thread)
ScriptEngine - execute "Export -> Bootproject and firmware (SD Card)" from python
Last updated: 2024-07-05
Codesys and CANopen manager sensors with same NodeID
CODESYS Forge
talk
(Thread)
Codesys and CANopen manager sensors with same NodeID
Last updated: 2024-07-22
Ruspberry PI and working with profinet slave.
CODESYS Forge
talk
(Thread)
Ruspberry PI and working with profinet slave.
Last updated: 2024-07-30
Link to MCP23017 DevDescr and Lib dead
CODESYS Forge
talk
(Thread)
Link to MCP23017 DevDescr and Lib dead
Last updated: 2024-09-16
List files in a directory with SysDiropen And SysDirRead
CODESYS Forge
talk
(Thread)
List files in a directory with SysDiropen And SysDirRead
Last updated: 2024-09-17
List files in a directory with SysDiropen And SysDirRead
CODESYS Forge
talk
(Thread)
List files in a directory with SysDiropen And SysDirRead
Last updated: 2024-09-17
To search for an exact phrase, put it in quotes. Example: "getting started docs"
To exclude a word or phrase, put a dash in front of it. Example: docs -help
To search on specific fields, use these field names instead of a general text search. You can group with AND or OR.