diff --git a/core/src/main/java/org/polypheny/db/type/entity/PolyString.java b/core/src/main/java/org/polypheny/db/type/entity/PolyString.java index a922bb8ead..4d8326c898 100644 --- a/core/src/main/java/org/polypheny/db/type/entity/PolyString.java +++ b/core/src/main/java/org/polypheny/db/type/entity/PolyString.java @@ -88,12 +88,12 @@ public static PolyString ofNullable( String value ) { @Override public @Nullable String toJson() { - return value == null ? JsonToken.VALUE_NULL.asString() : value.replace( "\"", "\\\"" ); + return value == null ? JsonToken.VALUE_NULL.asString() : value.replace( "\\", "\\\\" ).replace( "\"", "\\\"" ); } public @Nullable String toQuotedJson() { - return value == null ? JsonToken.VALUE_NULL.asString() : "\"" + value.replace( "\"", "\\\"" ) + "\""; + return value == null ? JsonToken.VALUE_NULL.asString() : "\"" + value.replace( "\\", "\\\\" ).replace( "\"", "\\\"" ) + "\""; }