nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Lawrence <wesleyll...@gmail.com>
Subject Re: Jolt Quesiton
Date Fri, 25 Aug 2017 19:14:46 GMT
Hey Pat,

Give this spec a try;
"arr": {
  "*": "=toString"
},
"val": {
  "*": {
    "*": "=toString"
  }
}

This site here (links specifically to a type conversion demo) is useful for
testing JOLT specs against an input;
https://jolt-demo.appspot.com/#modify-typeConversion



On Fri, Aug 25, 2017 at 2:50 PM, pat <plj@mitre.org> wrote:

> Howdy,
>
>   I'm trying to get jolt to change all of my "value" to strings.  I can't
> figure out how to do it.
> My source json is:
> {
>         "val": [{
>                 "value": 230
>         }],
>         "arr": {
>                 "value": 9878
>         }
> }
>
> my modify overwrite spec is
> {
>
>         "*": {
>                 "value": "=toString",
>                 "*": {
>                         "value": "=toString"
>                 }
>         }
> }
>
> and the result is:
> {
>         "val": [{
>                 "value": "230"
>         }],
>         "arr": {
>                 "value": 9878
>         }
> }
>
> Any thoughts on how to get past this?  I can't seem to get both of these to
> change to strings
>
>
> thank you
>
>
>
> --
> View this message in context: http://apache-nifi-users-list.
> 2361937.n4.nabble.com/Jolt-Quesiton-tp2759.html
> Sent from the Apache NiFi Users List mailing list archive at Nabble.com.
>

Mime
View raw message