ballerina-platform/ballerina-library

When a prefix is used when import jsondata expected type validation compiler analysis won't work

Closed this issue · 1 comments

Description:
$subject

Steps to reproduce:

import ballerina/data.jsondata as jd;
import ballerina/io;

type Union xml|json;

public function main() returns error? {
    string content = string `{"name": "John"}`;
    Union value = check jd:parseString(content);
    io:println(value);
}

Affected Versions:

OS, DB, other environment details and versions:

Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.