In json4s examples and documentation I often see the idioms
compact(render(jval))
and
pretty(render(jval))
I do not think I have actually seen an example with compact or pretty applied directly to a code generated JValue
,
but it is not clear to me what render
is doing here.
Render has type JValue => JValue
and I do not see any obvious difference it makes
and running
json.take(100000).filter(x => compact(render(x)) != compact(x))
on some of my data returns an empty an empty collection.
What does render
actually do?