MCPcopy Create free account
hub / github.com/ddf-project/DDF / fromJson

Method fromJson

core/src/main/java/io/ddf/ml/Model.java:120–131  ·  view source on GitHub ↗
(String json)

Source from the content-addressed store, hash-verified

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 {

Callers 6

deserializeFromDDFMethod · 0.95
serialize2DDFMethod · 0.80
deserializeMethod · 0.80
deserializeMethod · 0.80

Calls

no outgoing calls

Tested by 1