} else if (value.isJsonObject()) {
children.put(entry.getKey(), value.getAsJsonObject());
}
}
ResourceMock resource = new ResourceMock(parent, name);
for (Entry<String, String> entry : properties.entrySet()) {
resource.setProperty(entry.getKey(), entry.getValue());
}
for (Entry<String, JsonObject> entry : children.entrySet()) {
resource.addChild(parseResource(entry.getValue(), entry.getKey(), resource));
}
return resource;
}