// Create JSON to WorkspaceEntry
JsonGeneratorImpl generatorImpl = new JsonGeneratorImpl();
JsonValue json = generatorImpl.createJsonObject(wEntry);
ByteArrayOutputStream out = new ByteArrayOutputStream();
JsonWriter jsonWriter = new JsonWriterImpl(out);
json.writeTo(jsonWriter);
jsonWriter.flush();
jsonWriter.close();
// Create WorkspaceEntry from JSON
ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());