6/26/2024 7:01 PM | |
Joined: 9/1/2010 Last visit: 11/1/2024 Posts: 2 Rating: (0) |
Greetings, Application using the LStream library (link: https://support.industry.siemens.com/cs/us/en/view/109781165 ) After reading "demo.json" file from MMC, when "json_deserialize" is done, the last value is "lastUpdated": "2023-04-04T06:40:37+00:00" cannot be deserialized ! I enter this data manually manually, Then, when the "json_serialize" operation is performed, the "demo_out.json" file that it saves to the MMC does json parse incorrectly. How can we solve this problem. ================================================================== Searches for ',' at the end of the last "key-value" pair of the searched array. Since it cannot find this character, it does not write the value of the last key. When it reaches the end of the searched array, it should not look for ',' and instead look for '}' and print the last value? In which lines should we make these changes? ------------------------------------------------------------------------------------------ |
Last edited by: Saadettin KURTOGLU at: 06/26/2024 19:03:07Last edited by: Saadettin KURTOGLU at: 06/26/2024 21:49:59Last edited by: Jen_Moderator at: 06/27/2024 10:28:28New subject after splitting. Link and text formatting optimized. |
|
6/27/2024 3:44 PM | |
Joined: 7/7/2010 Last visit: 11/19/2024 Posts: 15406 Rating: (2446)
|
If you are manually modifying serialized json data, you need to use json serialization function to append another key/value pair. Avoid manual editing of json data unless you are 100% json expert.
|
science guy |
|
Follow us on