JKI-JSON-Serialization icon indicating copy to clipboard operation
JKI-JSON-Serialization copied to clipboard

Bug/issue 51 array with empty cluster

Open nate-moehring opened this issue 1 year ago • 4 comments

Issue https://github.com/JKISoftware/JKI-JSON-Serialization/issues/51

nate-moehring avatar Sep 12 '24 15:09 nate-moehring

One thing led to another, led to another, led to another, in order to resolve all of the unit test errors. This implementation works but I'm not happy with my workaround in the begin-array case of Parse Value. I haven't had time to look further into better solutions yet. The problem is the To Variant actually seems to be necessary to satisfy the Deserialized Mixed Arrays unit tests. I don't understand how JSON can support arrays with elements of different datatypes, but if that is a requirement, an error is thrown by the Flattened String to Variant at the end of Array of VData to VArray__ogtk.vi with the To Variant wrapping the disparate array elements.

I'll put some more time into this tomorrow for a few hours, but after that, it's going to be difficult for me to get more time on this for a while. Do you have any directed pointers for me?

nate-moehring avatar Sep 26 '24 05:09 nate-moehring

This is the list of errors that I get if I disable the current workaround of the To Variant loop-on-error after the Array of VData to VArray__ogtk.vi. With the workaround there are no unit test failures. image

This list of failures was much longer before I implemented the integer array look-ahead inspection.

nate-moehring avatar Sep 26 '24 16:09 nate-moehring

@jimkring , I squashed the commits, hoping you have some ideas for better implementation.

nate-moehring avatar Sep 29 '24 23:09 nate-moehring

@jimkring , any chance you've had a moment to pull the request?

nate-moehring avatar Oct 06 '24 21:10 nate-moehring