if (node.has("normal")) { JsonNode n = node.get("normal"); if (!n.has("mean") || !n.has("std")) { throw new JsonParseException("Cannot deserialize Distribution: legacy format 'normal' wrapper object " + " is missing 'mean' or 'std' field", jp.getCurrentLocation()); double s = n.get("std").asDouble(); return new NormalDistribution(m, s); } else if (node.has("gaussian")) { JsonNode n = node.get("gaussian"); if (!n.has("mean") || !n.has("std")) { throw new JsonParseException("Cannot deserialize Distribution: legacy format 'gaussian' wrapper object " + " is missing 'mean' or 'std' field", jp.getCurrentLocation()); } else if (node.has("uniform")) { JsonNode n = node.get("uniform"); if (!n.has("lower") || !n.has("upper")) { throw new JsonParseException("Cannot deserialize Distribution: legacy format 'uniform' wrapper object " + " is missing 'lower' or 'upper' field", jp.getCurrentLocation()); double u = n.get("upper").asDouble(); return new UniformDistribution(l, u); } else if (node.has("binomial")) { JsonNode n = node.get("binomial"); if (!n.has("numberOfTrials") || !n.has("probabilityOfSuccess")) { throw new JsonParseException("Cannot deserialize Distribution: legacy format 'binomial' wrapper object " + " is missing 'lower' or 'upper' field", jp.getCurrentLocation());