Skip to content

Conversation

@kpacha
Copy link

@kpacha kpacha commented Mar 9, 2023

Closes #27 and #63

@Gale-Zhang
Copy link

Gale-Zhang commented Mar 13, 2025

Hi! I have a self test with your branch and find that base operators(>, <, = ...) still not support json.Number. Following is a case:

jmespath:

sum(Stats[?Value>`1`].Value)

jsonData:

{
    "Stats":
    [
        {
            "ValueFloat": 1,
            "Interval": 9,
            "ItemType": 1,
            "Item": "123",
            "TimeSlot": "2025-01-01",
            "Value": 1
        },
        {
            "ValueFloat": 1,
            "Interval": 9,
            "ItemType": 1,
            "Item": "456",
            "TimeSlot": "2025-01-02",
            "Value": 3
        },
        {
            "ValueFloat": 1,
            "Interval": 9,
            "ItemType": 1,
            "Item": "789",
            "TimeSlot": "2025-01-03",
            "Value": 1
        }
    ],
    "DataReadyStatus":
    [],
    "Versions":
    [
        1
    ],
    "BaseResp":
    {
        "StatusMessage": "success",
        "StatusCode": 0
    }
}

the result is 0, which seems that all items have been filterred due to json.Number > operation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

json.Number format is not supported

2 participants