Assuming you mean using Version 6 of MarkLogic.
JSON documents can be loaded into MarkLogic in several ways.
If you load using the REST or Java API's the JSON documents are converted to a 
"black box" XML format using this conversion

http://docs.marklogic.com/json:transform-from-json
Using the "basic" strategy.

You can see what that looks like by either loading documents then inspecting 
them as XML ,
or you can run say in QConsole  the examples given at the above link.

Default indexing is done for the resultant XML.
You can also add your own indexes and work directly on the data as XML but you 
must then be aware of what this "black box" format is
and use XML indexing and queries.

Alternatively if you stick to the Java API  or REST layer you can make queries 
in JSON directly.

Another approach (more advanced) is to make use of the "custom" strategy to 
convert JSON to XML and back,
this requires more thought and effort but you have greater control over the 
transformation and can produce XML or JSON closer to
or identical to what you want.








-----------------------------------------------------------------------------
David Lee
Lead Engineer
MarkLogic Corporation
d...@marklogic.com
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com<http://www.marklogic.com/>


From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of 
gnanaprakash.bodire...@cognizant.com
Sent: Wednesday, June 26, 2013 9:24 AM
To: general@developer.marklogic.com
Subject: [MarkLogic Dev General] using JSON and indexing and querying JSON

Hi

I am just wondering if we could load only JSON documents into MarkLogic and 
then index the keys as we do for XML elements? (I know indexing is possible but 
my though

Can we create indexes similar to XML elements range, path range indexes?

Can we query the JSON similar to XQuery?

Gnana(GP)

Gnanaprakash Bodireddy | Sr. Associate - Projects | IME | Cognizant Technology 
Solutions.
Address: Manyata Embassy Business Park, Outer Ring Road, Rachenahalli, 
Bangalore, Karnataka, Pin :560045
O: +91 (80) 66808000 extn: 502406| Mobile: +91 8197558899

This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient(s), please reply to the sender and 
destroy all copies of the original message. Any unauthorized review, use, 
disclosure, dissemination, forwarding, printing or copying of this email, 
and/or any action taken in reliance on the contents of this e-mail is strictly 
prohibited and may be unlawful.
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to