I am marshalling an object into JSON that has JSON in a String property (String actionsJSON). This was causing that JSON to be escaped, so I am using Jackson annotation @JsonRawValue to get the JSON in that property not be escaped. The problem is that when I unmarshal it back into a String property (the reverse process) Jackson processes the JSON (which has a JSON array) and throws an error as the java class property is just a String:
Can not deserialize instance of java.lang.String out of START_ARRAY token
How can I make Jackson just copy the content of that property without trying to process it so I have JSON code inside the String property as I had in the original object?
(I have tried @JsonRawValue in the target class, ... @JsonSerialize(using = ToStringSerializer.class, as = StringSerializer.class) but error is still there.