Hi Gary,
If MarkDown is handled on the client, e.g. using something like
marked.js, an alternative is to handle the formatting of the JSON
snippets on the client as well (directly in JS in the browser).
Regards,
--
Florent Georges
http://fgeorges.org/
http://h2o.consulting/ - New website!
On
Thanks Justin,
I figured that one out about JSON.stringify. Ideally, it would be best to
eval to a function which can be reused. Of course safety and performance
would be issue. Not sure if V8 connection is kept open during xquery
evaluation. Anyways its for a small documentation app, that just
Gary, I hope all is well with you.
Currently xdmp:output doesn't affect JSON nodes. It should. I'll add a Request
For Enhancement (RFE) on my end to track this.
Here's a potential workaround:
(: See security guidance below :)
declare function json:stringify($json as node(), $spaces as xs:int)
All,
Is there an equivalent to format json output like
declare option xdmp:output "indent=yes";
___
General mailing list
General@developer.marklogic.com
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general