mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-25 18:15:00 +00:00
Continue Refactoring
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package com.bwssystems.HABridge.util;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import spark.ResponseTransformer;
|
||||
/*
|
||||
* Implementation of a Json renderer through google GSON utility.
|
||||
*/
|
||||
public class JsonTransformer implements ResponseTransformer {
|
||||
|
||||
private Gson gson = new Gson();
|
||||
|
||||
@Override
|
||||
public String render(Object model) {
|
||||
return gson.toJson(model);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user