JSON format requires to use double quotes for string values.
Since you are using Put Db record, check you schema for JSON data. Most
probably there is a mismatch between data/json structure  and schema.

Regards,
Ed.

On Thu, Aug 16, 2018 at 9:43 AM Kuhfahl, Bob <[email protected]> wrote:

> 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…
>

Reply via email to