(String json)
| 118 | } |
| 119 | |
| 120 | public static Model fromJson(String json) throws DDFException { |
| 121 | Gson gson = new GsonBuilder().registerTypeAdapter(Model.class, new ModelDeserializer()).create(); |
| 122 | |
| 123 | Model deserializedModel = gson.fromJson(json, Model.class); |
| 124 | |
| 125 | if (deserializedModel == null) { |
| 126 | throw new DDFException(String.format("Error deserialize json: %s", json)); |
| 127 | |
| 128 | } else { |
| 129 | return deserializedModel; |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | @Override |
| 134 | public DDF serialize2DDF(DDFManager manager) throws DDFException { |
no outgoing calls