Re: [basex-talk] Can't serialize entities to XML

2020-08-18 Thread Andreas Mixich
Am 18.08.2020 um 13:29 schrieb Christian Grün: > response. In the Reddit documentation, I found this: > > response body encoding > For legacy reasons, all JSON response bodies currently have <, >, > and & replaced with <, >, and &, respectively. If you wish > to opt out of this behaviour, add a r

Re: [basex-talk] Can't serialize entities to XML

2020-08-18 Thread Christian Grün
Hi Andreas, I was surprised indeeed to see entities escaped in the original response. In the Reddit documentation, I found this: response body encoding For legacy reasons, all JSON response bodies currently have <, >, and & replaced with <, >, and &, respectively. If you wish to opt out of this

Re: [basex-talk] Can't serialize entities to XML

2020-08-17 Thread Andreas Mixich
Am 17.08.2020 um 09:25 schrieb Christian Grün: > Hi Andreas, > > Before we fix the outcome, we should have a look at the initial HTTP > response. I assume the following function invokes http:send-request? > >> 1. let $data := local:get-article($token, concat($local:ahost, >> $link))/json True

Re: [basex-talk] Can't serialize entities to XML

2020-08-17 Thread Christian Grün
Hi Andreas, Before we fix the outcome, we should have a look at the initial HTTP response. I assume the following function invokes http:send-request? > 1. let $data := local:get-article($token, concat($local:ahost, > $link))/json Could you supply us with the full HTTP response (header and b

[basex-talk] Can't serialize entities to XML

2020-08-16 Thread Andreas Mixich
Hi, a REST API returns data in JSON, which I have requested via the http-client's `http:send-request#1` function with the following code:     1.  let $data := local:get-article($token, concat($local:ahost, $link))/json     2.  let $response := json:serialize($data, map{'format':'xquery'})     3.