Error -375005 Unflatten From JSON, Type Mismatch Between JSON and LabVIEW

Updated Aug 17, 2018

Reported In

Software

  • LabVIEW

Issue Details

I am using the Unflatten From JSON.VI to read from a JSON string, but I keep getting Error -375005 occurred at Unflatten from JSON in JSON_unflatten.vi with possible reason as LabVIEW:  Type mismatch between JSON and LabVIEW.

Solution

Error -375005 occurred at Unflatten from JSON in JSON_unflatten.vi with possible reason LabVIEW:  Type mismatch between JSON and LabVIEW. has two know possible causes:
  • The type and defaults input does not match the data type in the JSON String specified by the path input.  To fix this, make sure type and defaults matches the expected type of the JSON String that the path input points to.

    For example, the below code would throw Error -375005 because the JSON String is an array of numbers, or a string, but we are specifying the type and defaults as a scalar number:

    But if it is corrected to an array of numbers, then the error will not be thrown:

    Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW block diagram.
  • The JSON string includes a null value.  To fix this, make sure the JSON string does not include a null value

WAS THIS ARTICLE HELPFUL?

Not Helpful