Hi, I jut saw that the Vertex can be casted to OIdentifiable, which has a toRecord-method. So I create the JsonObject now in the following way: new JsonObject(((OIdentifiable)vertex).getRecord().toJSON()) . This might not be the most beautiful way, because a String is used as intermediate format, but it works. Ciao Gregor
On Monday, February 2, 2015 at 9:28:09 AM UTC+1, Gregor Frey wrote: > > Hi, > I'm using the OrientDB with Vertex and want to convert a Vertex to an > JsonObject (which can be used as payload for the eventbus). Is there a > simple conversion method? > The ODocument class provides a method toJSON, which converts the document > to a JsonString. But a Vertex is not an ODocument (unfortunately) and I do > not find a way to transform the Vertex to a ODocument. Does anyone have any > recommendations? > Ciao > Gregor > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
