We need to evalue json object expression in java
we have following source json object
{
"model":"abc",
"variant":"m1",
"stage":2,
"a":100,
"b":200,
"display name":"${model}-${variant}",
"c":"${a}*${b}",
"description":"${model}-${variant}-${stage*10}"
}
after evaluation the json object should be like
{
"model":"abc",
"variant":"m1",
"stage":2,
"a":100,
"b":200,
"display name":"abc-m1",
"c":"300",
"description":"abc-m1-20"
}
expression can be of 3 types
- Pure arithmetic expression
- concat strings
- combination of concat and arithmetic expression
We are open to any modification in source json to define expression representation
Regards, Pranav
we tried https://github.com/json-path/JsonPath but that is more of a filtering json