Nandan ...

The Graph API is overlaid on top of the ODocument APIs.  For any
OrientElement (ie: OrientVertex, OrientEdge), you can call getRecord() to
get the backing ODocument object.  If you look at the ODocument class,
there is a much wider selection of methods for moving data to and from JSON
text.

Note, JSON is a text data format, with many library implementations that
will provide APIs to process text and produce Java objects. While Orient
does provide the Jackson 2.2.X jars with their distribution, those APIs are
largely used internally and are not incorporated into Orient's public API.
Orient can't be expected to support every Java JSON implementation, when
the JSON standard describes the text format and not internal binary
representations.

- Craig -

On Mon, Jun 8, 2015 at 7:47 AM, nandan parikh <[email protected]>
wrote:

> I tried storing the JSON object as string and it works fine.
> But storing as a JSON object as object itself shows serialization error.
>
> Code :
>
> Vertex v = graph.addVertex(null);
> JSONObject json = new JSONObject();
>
> json.put("name","someone");
> json.put("address","somewhere");
>
> v.setProperty("data", json);
>  ( v.setProperty("data",json.toString() --- this works fine )
>
> This code shows serialization error.. Cannot serialize JSONObject!
>
> Any method to store JSON Objects as Objects without converting to string?
>
> Thanks.
>
> --
>
> ---
> 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.
>

-- 

--- 
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.

Reply via email to