Case type statement for JsonNode

I’m parsing Json with RTL2 and am trying to use a case statement to determine the value type.

I have a variable jsonItem of type JsonNode.

This works as expected:

if jsonItem is JsonIntegerValue then
    ...
else if jsonItem is JsonStringValue then
    ...

This does not compile:

case jsonItem of
    JsonIntegerValue:
        ;
    JsonStringValue:
        ;
    else
end;

I get a compiler error

Type mismatch, expected “JsonNode”

From the docs it looks like this should work. Am I missing something?

You’d want

case jsonItem type of

Can you point me to the docs that say this should work as you quoted, so i can see if that needs correcting?

Thanx,
marc

Ah thought I tried that but I must have typed something wrong because that is working. The docs I saw are here https://docs.elementscompiler.com/Oxygene/Statements/Case/ and omit type from the example.