_JSONify
Turn the received value into JSON --
Function
Anything -> _JSONify
(pretty) -> Plain Text Type
- Receives
- Anything
- pretty (optional)
- If set to True, the Json will be pretty-printed. Otherwise, it will be compact.
- Produces
- The JSON representation of the received values.
Sometimes you want to export some data from Querki. One of the common export formats is JSON
(JavaScript Object Notation). This function takes any Querki value, and renders it as JSON.
As currently written, this will always produce a top-level array of values. This is highly
subject to change.
It can be convenient to combine this with
_makePropertyBundle, using that to define
exactly the data structure you want, and this to turn that into JSON.
Important: as of this writing, this function is pretty experimental. It doesn't yet deal
with any arbitrary Value (in particular, it intentionally does not deal with Thing Properties
yet), and it is subject to change. If you have opinions about it, please write to us. We are
likely to add real JSON APIs down the road, and that might supercede this function.