Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: JeffS on August 14, 2020, 04:28:31 PM

Title: JSON Parse
Post by: JeffS on August 14, 2020, 04:28:31 PM
I saw today that not all parameters in a JSONPARSE are updated when doing a replace or swap.  The "Found Value Numeric/Bit" parameter is the one I noticed didn't move correctly.
Title: Re: JSON Parse
Post by: franji1 on August 14, 2020, 05:16:45 PM
I could not duplicate it.  In a new project, I did a new JSONPARSE, changed the Found Value to Numeric/Bit, it sets it to D1028 (Return Results is D1030):
JSONPARSE SS0 DST511 1 0x100 """Name""" DST511 SS0 SS0 DST511 1 DST511 D1028 D1030

I did a Replace of D1028 with D2000 and it worked:
JSONPARSE SS0 DST511 1 0x100 """Name""" DST511 SS0 SS0 DST511 1 DST511 D2000 D1030

That doesn't mean there isn't an issue, it could just mean I could not duplicate it doing the steps above (e.g. may be a combination of your specific parameters).

Please provide the steps where you can duplicate it in a New project.  If you can't duplicate it in a New project, that may point to a different issue (let us know).




Title: Re: JSON Parse
Post by: JeffS on August 14, 2020, 06:29:32 PM
In my case I was using a V memory and within the code block I use several V's as pointers, but not the same V memory as in the JSONPARSE. 
Title: Re: JSON Parse
Post by: JeffS on August 26, 2020, 10:08:43 AM
So I wasn't able to reproduce this in a blank project. 

These are the steps where this showed up: I had a block of code containing the JSONPARSE and I copied it out into a new project so that I could format it to be copied into several other projects.  In this new project I then expanded the standard memory ranges in this project and moved all memory used in the copied code into this new range so that I ran no risk of using a memory range that was already being used in another program.  I was using the replace/swap function to do this and it is where the problem showed.  The only instruction that had issue was the JSONPARSE where the swap/replace moved the documentation but did not change the memory in this instruction.  This occurred in several code blocks that had been copied over containing JSONPARSE commands.
Title: Re: JSON Parse
Post by: franji1 on August 26, 2020, 10:27:12 AM
The only instruction that had issue was the JSONPARSE where the swap/replace moved the documentation but did not change the memory in this instruction.  This occurred in several code blocks that had been copied over containing JSONPARSE commands.

When you duplicate it, can you paste the JSONPARSE instruction here.  Just do Ctrl+C in Designer on that specific JSONPARSE instruction, and then paste it into your forum post - remove the sysconfig, memconfig, and documentation sections.  Then provide the exact replace/swap settings that fail.