projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adapt Editor to new system, removed json duplication
[Mograsim.git]
/
net.mograsim.logic.model
/
src
/
net
/
mograsim
/
logic
/
model
/
util
/
JsonHandler.java
diff --git
a/net.mograsim.logic.model/src/net/mograsim/logic/model/util/JsonHandler.java
b/net.mograsim.logic.model/src/net/mograsim/logic/model/util/JsonHandler.java
index
4f60bdf
..
0f151b9
100644
(file)
--- a/
net.mograsim.logic.model/src/net/mograsim/logic/model/util/JsonHandler.java
+++ b/
net.mograsim.logic.model/src/net/mograsim/logic/model/util/JsonHandler.java
@@
-42,6
+42,11
@@
public class JsonHandler
return parser.fromJson(rawJson, type);
}
return parser.fromJson(rawJson, type);
}
+ public static <T> T fromJsonTree(JsonElement src, Class<T> type)
+ {
+ return parser.fromJson(src, type);
+ }
+
public static void writeJson(Object o, String path) throws IOException
{
try (FileWriter writer = new FileWriter(path))
public static void writeJson(Object o, String path) throws IOException
{
try (FileWriter writer = new FileWriter(path))