Changes

Jump to navigation Jump to search
468 bytes added ,  16:23, 18 February 2015
For example, if <code>application/json;lax=yes</code> is specified as content type, the input will be transformed to JSON, and the lax QName conversion rules will be applied, as described in the [[JSON Module]].
 
===Input options===
 
Since {{Version|8.1}}, conversion options for JSON, CSV and HTML can also be specified via annotations using the <code>input</code> prefix. The following function treats the first line of the textual input as CSV header:
 
<pre class="brush:xquery">
declare
%rest:path("/store.csv")
%rest:POST("{$csv}")
%input:csv("header=true")
function page:store-csv($csv as document-node())
{
"Number of rows: " || count($csv/csv/record)
};
</pre>
===Multipart Types===
</pre>
Please note that support for multipart types is still experimental,at beta stage.and it It may change be changed in a future version BaseX. Your feedback is welcome.
==Parameters==
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu