Skip to content

Commit

Permalink
SurrealClient: fix encoding for special chars and non-ascii chars
Browse files Browse the repository at this point in the history
  • Loading branch information
coder966 committed Sep 20, 2022
1 parent ba52cec commit 0f5ccc7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/surrealdb/java/client/SurrealClient.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.surrealdb.java.client;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.surrealdb.java.client.model.RpcRequest;
import com.surrealdb.java.client.model.RpcResponse;
import lombok.SneakyThrows;
Expand All @@ -26,7 +27,7 @@ public SurrealClient(String host, int port){
log.debug("Connecting to SurrealDB server {}", "ws://"+host+":"+port);
connectBlocking();

this.gson = new Gson();
this.gson = new GsonBuilder().disableHtmlEscaping().create();
this.callbacks = new HashMap<>();
this.resultTypes = new HashMap<>();
}
Expand Down

0 comments on commit 0f5ccc7

Please sign in to comment.