String to JSON ERROR

Hi!
I’m trying to use the node the string to JSON, but I’m getting this error:

ERROR String to JSON 0:428:185:184:161 Execute failed: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value
at [Source: java.io.StringReader@c9a7318; line: 1, column: 145]
in row: Row663

Does anybody knows how to solve this?

Can you share the JSON string? Obviously there’s an unexpected character in it. (code 10 suggests a newline?!)

– Philipp

Unfortunately I can’t share the JSON string, but you’re right, code 10 suggests a new line.
I think if I solve this compilation error I will solve my problem:

WARN Java Snippet 0: 428: 185: 407 Compile with errors:
Error at line 28: Mapper cannot be resolved
Error at line 28: ALLOW_UNQUOTED_CONTROL_CHARS cannot be resolved or is not a field

Mmmmmh. Not sure I understand how this relates to a Java Snippet now?

by steps:

  1. when I open the workflow this compilation WARN/error happens (is shown on the console )
    and
  2. when I run the ‘string to JSON’ node the 'Illegal unquoted character ’ error happens

Hi there @Doug,

have you managed to fix it? If not you can check here for more info: https://stackoverflow.com/questions/31537153/jsonparseexception-illegal-unquoted-character-ctrl-char-code-10

Br,
Ivan

Thanks @ipazin!

But it was precisely because of this article that I thought about the relationship between step 1 and 2 above…
I didn’t solve this problem, but I got around with node string manipulation =)

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.