Thanks for the tip! By declaring the %output:method("json") annotation AND
calling the serialize function, I was basically reserializing the data.
--
Tim A. Thompson
Discovery Metadata Librarian
Yale University Library
On Thu, Aug 1, 2019 at 8:55 AM Marco Lettere wrote:
> Maybe using
Maybe using json:serialize() rather than serialize?
In general if output:method is set to Json it should be sufficient to
return map{} or array{} or alternatively the XML version of a json
document without having to explicitly serialize ...
M.
On 01/08/19 14:36, Tim Thompson wrote:
Thank
Thank you, Marco. So, the download issue seems to be with XForms
(XSLTForms) rather than BaseX. If I do a file upload from a plain HTML
form, the file download is triggered correctly. However, even though I have
set "application/json" as the Content-Type, the contents of the downloaded
file are an
Hi Tim,
downloading from a browser when posting a form is usually a bit tricky.
For me it always ended up with the creation of an artificial
element with an href crafted from the form parameters and with an
attribute download="filename.ext" added to it.
Anyway you could try with returning a
Hello,
I am posting a JSON doc to a RESTXQ function from XForms and trying to set
a Content-Disposition header to trigger a file download. Is this possible
to do without first saving the JSON doc as a file? Right now, the RESTXQ
function returns the correct headers, but does not force a file
5 matches
Mail list logo