12-19-2022 04:40 PM
I'm using a REST API for Jira to retrieve release information for my software. It works. But for some reason, when a field is blank in Jira, the response JSON string is returned missing that cluster element instead of returning it with a blank value. This seems to just be the way the Jira works. I'm not sure if this is a bug on Jira's part or what.
I would think that Unflatten From JSON could handle such a thing, but it doesn't seem to be able to. When it hits a missing cluster element, it errors and then stops unflattening the string. Default Null Elements does not help... assuming that is due to the element not being there at all.
An example string is below. The first cluster shown is complete, so it unflattens just fine. But the second cluster is missing the release date since it was never released. Maybe the missing element is a bug in Jira's API... but I would think there would be a way to deal with this in LV.
{"self":"url","id":"26153","description":"Current Build of the Software","name":"software name","archived":true,"released":true,"releaseDate":"2018-04-13","userReleaseDate":"13/Apr/18","projectId":13361},{"self":"url","id":"29052","name":"software name","archived":true,"released":false,"projectId":13361}
I'm thinking that I will end up having to create my own VIs to unflatten these strings. But I was wondering if any of you have a clever alternative.
12-19-2022 05:22 PM
Unless you suffer from NIHS (the Not Invented Here Syndrome) you can also checkout this library instead: https://lavag.org/files/file/294-jsontext/