瀏覽代碼

Revert JSON change to Java/voovan (#4587)

Nate 6 年之前
父節點
當前提交
da383e6b32
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      frameworks/Java/voovan/src/main/java/org/voovan/VoovanTFB.java

+ 1 - 2
frameworks/Java/voovan/src/main/java/org/voovan/VoovanTFB.java

@@ -16,7 +16,6 @@ import java.util.Map;
 
 
 public class VoovanTFB {
 public class VoovanTFB {
 	private static final byte[] HELLO_WORLD = "Hello, World!".getBytes();
 	private static final byte[] HELLO_WORLD = "Hello, World!".getBytes();
-	private static final Map MAP = TObject.asMap("message", "Hello, World!");
 
 
 
 
 	public static void main(String[] args) {
 	public static void main(String[] args) {
@@ -45,7 +44,7 @@ public class VoovanTFB {
 		webServer.get("/json", new HttpRouter() {
 		webServer.get("/json", new HttpRouter() {
 			public void process(HttpRequest req, HttpResponse resp) throws Exception {
 			public void process(HttpRequest req, HttpResponse resp) throws Exception {
 				resp.header().put("Content-Type", "application/json");
 				resp.header().put("Content-Type", "application/json");
-				resp.write(JSON.toJSON(MAP, false, false));
+				resp.write(JSON.toJSON(TObject.asMap("message", "Hello, World!")));
 			}
 			}
 		});
 		});