I've got an API call that's returning the following JSON:
{
"account_id": "accountID",
"processed_length": 41,
"sentiment": "NEGATIVE",
"sentiment_score": -0.800000011920929,
"text": "This is the worst possible solution ever."
}
I'm trying to print sentiment_score as its current value but {{sentiment_score}} is printing as 0. {{sentiment_score|float}} printed as 0.0. How can I get the full value and that it's negative in Jinja? {{sentiment}} and {{text}} are printing their values just fine.
I was able to get it to show the minus sign by using {{0 + sentiment_score}}.
I didn't have the problem of truncated numbers though.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.