[
https://issues.apache.org/jira/browse/CAMEL-19035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Xilai Dai updated CAMEL-19035:
------------------------------
Description:
Given a json payload e.g:
{code}
{
"ABC": "A",
"VERSION_NO": "BASE",
"DEF": [
{
"GGG": 1,
"HHH": "N",
"OOO": [
{
"PPP": 1,
"QQQ": 555.55,
"RRR": 666.66,
"SSS": 0,
"TTT": 777.77
},
{
"PPP": 3,
"QQQ": .05,
"RRR": .10,
"SSS": 0,
"TTT": .10
}
]
}
]
}
{code}
In case of there is something e.g invalid integer value (.05) in the payload
- .jsonpath("$.VERSION_NO") works as expected in Camel version less than 3.10.0.
- .jsonpath("$.VERSION_NO") will throw parse exception in Camel version great
than 3.10.0.
Investigation shows that this regression was starting happening after
CAMEL-16389.
https://github.com/apache/camel/commit/b59a96ddf1ba647b979f937f5bd956bba32173ee
Now camel-jsonpath is trying to parse whole json payload.
Attached test-jsonpath.zip for test/reproduce this issue.
was:
Given a json payload e.g:
{code}
{
"ABC": "A",
"VERSION_NO": "BASE",
"DEF": [
{
"GGG": 1,
"HHH": "N",
"OOO": [
{
"PPP": 1,
"QQQ": 555.55,
"RRR": 666.66,
"SSS": 0,
"TTT": 777.77
},
{
"PPP": 3,
"QQQ": .05,
"RRR": .10,
"SSS": 0,
"TTT": .10
}
]
}
]
}
{code}
In case of there is something e.g invalid integer value (.05) in the payload
- .jsonpath("$.VERSION_NO") works as expected in Camel version less than 3.10.0.
- .jsonpath("$.VERSION_NO") will throw parse exception in Camel version great
than 3.10.0.
Investigation shows that this regression was starting happening after
CAMEL-16397.
https://github.com/apache/camel/commit/e9e8ed2057f0122f30664eb123ca00775a69c538
Now camel-jsonpath is trying to parse whole json payload.
Attached test-jsonpath.zip for test/reproduce this issue.
> Camel-jsonpath is parsing whole json payload from 3.10.0
> --------------------------------------------------------
>
> Key: CAMEL-19035
> URL: https://issues.apache.org/jira/browse/CAMEL-19035
> Project: Camel
> Issue Type: Bug
> Components: camel-jsonpath
> Affects Versions: 3.11.0
> Reporter: Xilai Dai
> Assignee: Nicolas Filotto
> Priority: Minor
> Attachments: test-jsonpath.zip
>
>
> Given a json payload e.g:
> {code}
> {
> "ABC": "A",
> "VERSION_NO": "BASE",
> "DEF": [
> {
> "GGG": 1,
> "HHH": "N",
> "OOO": [
> {
> "PPP": 1,
> "QQQ": 555.55,
> "RRR": 666.66,
> "SSS": 0,
> "TTT": 777.77
> },
> {
> "PPP": 3,
> "QQQ": .05,
> "RRR": .10,
> "SSS": 0,
> "TTT": .10
> }
> ]
> }
> ]
> }
> {code}
> In case of there is something e.g invalid integer value (.05) in the payload
> - .jsonpath("$.VERSION_NO") works as expected in Camel version less than
> 3.10.0.
> - .jsonpath("$.VERSION_NO") will throw parse exception in Camel version great
> than 3.10.0.
> Investigation shows that this regression was starting happening after
> CAMEL-16389.
> https://github.com/apache/camel/commit/b59a96ddf1ba647b979f937f5bd956bba32173ee
> Now camel-jsonpath is trying to parse whole json payload.
> Attached test-jsonpath.zip for test/reproduce this issue.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)