New escape-solidus option
Friday, 20 October 2023 · 4 messages · last reply 23 Oct 2023
TT
Thompson, Timothy20 Oct 2023 22:07 #
Hello,
I was very happy to see that a new escape-solidus option had been defined for XQuery/XPath 4.0. Is this available in the latest BaseX snapshot?
I tried this:
<fn:map>
<fn:string key="Escape/Solidus">Test</fn:string>
</fn:map> => serialize(map {"method": "json", "json": map {"format": "basic", "escape-solidus": "no"}})But it returns:
{"Escape\/Solidus":"Test"}
Thank you,
Tim
--
Tim A. Thompson (he, him)
Librarian for Applied Metadata Research
Yale University Library
CG
Christian Grün20 Oct 2023 22:11 #
Hi Tim,
You are really on the cutting edge :) I’ll upload a new snapshot with the new option in a few days; I will keep you posted.
Best,
Christian
Thompson, Timothy <timothy.thompson at yale.edu> schrieb am Fr., 20. Okt. 2023, 22:07:
Quoted text · Thompson, Timothy · 44 lines
> Hello, > > > > I was very happy to see that a new *escape-solidus* option had been > defined for XQuery/XPath 4.0. Is this available in the latest BaseX > snapshot? > > > > I tried this: > > <fn:map> > > <fn:string key="Escape/Solidus">Test</fn:string> > > </fn:map> => serialize(map {"method": "json", "json": map {"format": > "basic", "escape-solidus": "no"}}) > > > > But it returns: > > {"Escape\/Solidus":"Test"} > > > > > > Thank you, > > Tim > > > > > > -- > Tim A. Thompson (*he, him*) > Librarian for Applied Metadata Research > Yale University Library > > >
CG
Hi Tim,
A new snapshot is available [1]. Please note that you’ll need to write…
<fn:map>
<fn:string key="Escape/Solidus">Test</fn:string>
</fn:map> => serialize(map { "escape-solidus": "no",
"method": "json",
"json": map {"format": "basic" }
})
…because “escape-solidus” is defined as a standard serialization parameter (similar to “json-node-output-method”). It seems that will be the final solution [2].
Hope this helps,
Christian
[1] https://files.basex.org/releases/latest/
[2] https://github.com/qt4cg/qtspecs/issues/759
Quoted text · Timothy · 46 lines
On Fri, Oct 20, 2023 at 10:07 PM Thompson, Timothy < timothy.thompson at yale.edu> wrote: > Hello, > > > > I was very happy to see that a new *escape-solidus* option had been > defined for XQuery/XPath 4.0. Is this available in the latest BaseX > snapshot? > > > > I tried this: > > <fn:map> > > <fn:string key="Escape/Solidus">Test</fn:string> > > </fn:map> => serialize(map {"method": "json", "json": map {"format": > "basic", "escape-solidus": "no"}}) > > > > But it returns: > > {"Escape\/Solidus":"Test"} > > > > > > Thank you, > > Tim > > > > > > -- > Tim A. Thompson (*he, him*) > Librarian for Applied Metadata Research > Yale University Library > > >
TT
Thompson, Timothy23 Oct 2023 20:53 #
Thanks, Christian! Works perfectly :)
Tim
--
Tim A. Thompson (he, him)
Librarian for Applied Metadata Research
Yale University Library
Quoted text · Christian Grün · 34 lines
From: Christian Grün <christian.gruen at gmail.com> Date: Monday, October 23, 2023 at 12:19 PM To: Thompson, Timothy <timothy.thompson at yale.edu> Cc: basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] New escape-solidus option Hi Tim, A new snapshot is available [1]. Please note that you’ll need to write… <fn:map> <fn:string key="Escape/Solidus">Test</fn:string> </fn:map> => serialize(map { "escape-solidus": "no", "method": "json", "json": map {"format": "basic" } }) …because “escape-solidus” is defined as a standard serialization parameter (similar to “json-node-output-method”). It seems that will be the final solution [2]. Hope this helps, Christian [1] https://files.basex.org/releases/latest/ [2] https://github.com/qt4cg/qtspecs/issues/759 On Fri, Oct 20, 2023 at 10:07 PM Thompson, Timothy <timothy.thompson at yale.edu<mailto:timothy.thompson at yale.edu>> wrote: Hello, I was very happy to see that a new escape-solidus option had been defined for XQuery/XPath 4.0. Is this available in the latest BaseX snapshot? I tried this: <fn:map> <fn:string key="Escape/Solidus">Test</fn:string> </fn:map> => serialize(map {"method": "json", "json": map {"format": "basic", "escape-solidus": "no"}}) But it returns: {"Escape\/Solidus":"Test"} Thank you, Tim -- Tim A. Thompson (he, him) Librarian for Applied Metadata Research Yale University Library
Written for BaseX 10.7. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery