Skip to content

Commit

Permalink
Merge pull request #4 from nextbss/aj-impr
Browse files Browse the repository at this point in the history
make public
  • Loading branch information
AlexJuca authored Sep 18, 2019
2 parents 9e3ecb6 + 9b0a2ce commit a90fc54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/co/ao/nextbss/Yoru.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class Yoru<T> {
mapper = new ObjectMapper();
}

String toJson(Object content) {
public String toJson(Object content) {
mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
ObjectWriter ow = mapper.writer().withDefaultPrettyPrinter();
try {
Expand All @@ -25,7 +25,7 @@ String toJson(Object content) {
return null;
}

T fromJson(String body, Class<T> clazz) throws IOException {
public T fromJson(String body, Class<T> clazz) throws IOException {
return mapper.readValue(body, clazz);
}
}

0 comments on commit a90fc54

Please sign in to comment.