You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need some quoting and I'm thinking about what would be the easiest or most efficient way.
do a bunch of replaces (str.replace("\\", "\\\\").replace("\"", "\\\"").replace("\b", "\\b").replace("\f", "\\f").replace("\n", "\\n").replace("\r", "\\r").replace("\t", "\\t");)
Expected behavior
When collecting metrics with
collectMetrics().asJson()
I expect that a valid json is returnedActual behavior
We have a raw query:
in our application. The query itself is irrelevant, only the fact, that it contains
"
is important hereSteps to reproduce
The SQL is appended without quoting here
https://github.com/ebean-orm/ebean/blob/master/ebean-api/src/main/java/io/ebean/meta/MetricsAsJson.java#L149
and results in a metric json that looks like this
which is invalid.
We need some quoting and I'm thinking about what would be the easiest or most efficient way.
str.replace("\\", "\\\\").replace("\"", "\\\"").replace("\b", "\\b").replace("\f", "\\f").replace("\n", "\\n").replace("\r", "\\r").replace("\t", "\\t");
)The text was updated successfully, but these errors were encountered: