Action: OutputJSON

Purpose: Outputs the entire selected DOM as a JSON String

Action-specific name/value pairs:

Parameter Name Description
DocumentName or DocumentOID The Name or OID of the document that is to be output.

Example Request

Action=OutputJSON
&DocumentName=myExample
&MDBAccessKeyId=[your access key id]
&Signature=[computed signature]
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2009-06-14T13%3A19%3A41
&Version=2009-04-15
&db=mdbx

Example Response

{#ProcessingInstruction:{Target:"xml",Data:"version="1.0""},
 doc:{aaa:{bbb:{bar:[{name:"Robin Hood",#text:"pub 10",beer:[{name:"guinness"},
 {name:"tetleys"}]},{#text:"As yet un-named pub"}]},foo:{ccc:null}},
 foo:[{location:"Drumcondra",bar:[{name:"Cat and Cage",#text:"pub 1"},
 {name:"Fagan's",owner:"John",tied:"true",#text:"pub 2"},{name:"Gravedigger's",#text:"pub 3"},
 {name:"Ivy House",#text:"pub 4"}],offlicense:{name:"oddbins"}},{location:"Town",
 bar:[{name:"Peter's Pub",#text:"pub 5"},{name:"Grogan's",#text:"pub 6"},
 {name:"Hogans's",#text:"club 1"},{name:"Brogan's",owner:"James",tied:"false",#text:"pub 8"},
 {closed:"yes",#text:"pub 9"}],offlicense:{name:"unwins"}}]}}

Note: compare this with the OutputDOM Example which shows the same DOM rendered as XML

Note that the unmodified contents of the specified XML document will be output as a JSON object. M/DB:X will not add any other name/value pairs to the JSON output. This allows M/DB:X to be used as a true JSON Document Store.