I have to massage some JSON to pass into PutDatabaseRecord so I can insert the
data into postgresql.
Postgres wants the identifers to have double quotes and it seems the values
need to have single quotes (for the strings).
Sample JSON input:
"producer_userid": "fdolomite",
Search Value:
(?<=\": )\"(.+)\"
Replacement Value:
'$1'
I can get a small java program to use the above and replace the “ (double
quotes) around the value to ‘ (single quotes) e.g.:
"producer_userid": ‘fdolomite’,
But… ReplaceText is not doing it. I’ve tried surrounding the search &
replacement values in quotes (pretty sure that was not the problem, but heh).
All I get in the log file is it moved the flow to success.
From reading the source code for ReplaceText , it’s using the Java Pattern()
and replaceAll() so I think my sample program is doing the same work, including
matcher.find()
So I must be missing something…