use of com.yahoo.slime.JsonDecoder in project vespa by vespa-engine.
the class ProjectBundleClassPaths method load.
static ProjectBundleClassPaths load(byte[] bytes) {
Slime slime = new Slime();
new JsonDecoder().decode(slime, bytes);
Inspector inspector = slime.get();
BundleClasspathMapping mainBundle = BundleClasspathMapping.load(inspector.field("mainBundle"));
Inspector dependenciesInspector = inspector.field("providedDependencies");
List<BundleClasspathMapping> providedDependencies = new ArrayList<>();
for (int i = 0; i < dependenciesInspector.entries(); i++) {
providedDependencies.add(BundleClasspathMapping.load(dependenciesInspector.entry(i)));
}
return new ProjectBundleClassPaths(mainBundle, providedDependencies);
}
Aggregations