mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-18 16:17:30 +00:00
17 lines
359 B
Java
17 lines
359 B
Java
package com.bwssystems.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);
|
|
}
|
|
|
|
} |