Skip to main content

Hi folks,

While I was extracting a nested JSON object using the JSONExtractor, it seemed like I stumbled upon an issue. Consider the following JSON:

{
    "integer_0": 2019,
    "string_0": "hello",
    "boolean_0": false,
    "nested_item": {
        "integer_1": 2020,
        "string_1": "bye",
        "boolean_1": true
    }
}

When I use the JSONExtractor with target attribute 'boolean_0' and JSON Query 'jsonu"boolean_0"]', it creates an attribute 'boolean_0' with value 'false'. So far so good.

If I however use the JSONExtractor with target attribute 'nested_item' and JSON Query 'json<"nested_item"]', it creates an attribute 'nested_item' with value:

{
    "integer_1": 2020,
    "string_1": "bye",
    "boolean_1": 1
}

In this case it thus seems that the boolean value of the json object 'boolean_1' is converted from 'true' to '1'. When using the JSONFragmenter I don't experience this automatic conversion.

 

Am I overlooking something and is this intended behaviour for the JSONExtractor, or is this some kind of bug?

 

Thoughts on the matter are appreciated.

 

Kind regards,

 

Thijs

 

ps. attached is a workspace that illustrates the issue: 

 

I just stumbled on this issue while migrating an old workspace from FME 2014 to 2018.1.2 and can confirm this behavior. Looks like a software bug to me.


Hi @thijsknapen and @offermann82

I'm sorry you ran into this issue. I was able to reproduce the behaviour reported in 2018.x, 2019.0, 2019.1 and have filed a bug report tracking this issue.

Once the issue has been resolved, I will post an update to this Forum post.


Hi @thijsknapen and @offermann82

I'm pleased to say this issue has been fixed in the latest released build of FME 2019.0 and FME 2019.1 betas. You can access the installers at www.safe.com/downloads Thanks!


Hi @thijsknapen and @offermann82

I'm pleased to say this issue has been fixed in the latest released build of FME 2019.0 and FME 2019.1 betas. You can access the installers at www.safe.com/downloads Thanks!

Great to hear :)


Reply