Escape characters for text in Clojure client

Closes #1648
This commit is contained in:
xhh 2015-12-02 10:24:01 +08:00
parent 76de987cd2
commit 2b9fe5c9bf

View File

@ -177,6 +177,14 @@ public class ClojureClientCodegen extends DefaultCodegen implements CodegenConfi
return name;
}
@Override
public String escapeText(String input) {
if (input == null) {
return null;
}
return input.trim().replace("\\", "\\\\").replace("\"", "\\\"");
}
@Override
public Map<String, Object> postProcessOperations(Map<String, Object> operations) {
Map<String, Object> objs = (Map<String, Object>) operations.get("operations");