adamfowleruk / mljs

MarkLogic REST API JavaScript wrapper for NodeJS and Browser Apps
http://adamfowleruk.github.io/mljs/apidocs/core/tutorial-all.html
Other
33 stars 19 forks source link

Enterprise: Content type agnostic #15

Closed adamfowleruk closed 11 years ago

adamfowleruk commented 11 years ago

Support XML and JSON from every method in JavaScript API

adamfowleruk commented 11 years ago

In progress as of 0.6. Works for errors, get(), search results (content only, not metadata). Need work for facets, etc.

adamfowleruk commented 11 years ago

I should clarify - this only applies to the data being passed in and out of MLDB. The calls themselves can still be in JSON for the most part. I will not support XML only requests. E.g. a search will be carried out in JSON, but the results could return a set of document content which includes XML documents and/or JSON documents.

Known methods to test:- get() save() saveAll() saveAll2() merge() (should throw exception on XML) search() collection() list() do() (providing content as XML document for PUT, for example) keyvalue() (not sure if this does) metadata() (not sure if this should) searchCollection() structuredSearch()

adamfowleruk commented 11 years ago

Complete and tested for JSON, XML, and snippeting. Default renderer supports any XML, JSON and SVG. Text also supported but a bug in the REST API means this doesn't work currently.