Open eflister opened 4 years ago
great discussion here, and see also https://github.com/bos/aeson/issues/807
Sorry, I've had no time to look at @hvega@ recently. I will note that the option support in toHtmlFileWith
has only been lightly tested, so there may well be work needed here.
nbd, the Int
hack works fine, just wanted to figure out the "right" way -- looks like it is not simple+obvious, so i'm not pushing on it
hi- i don't know anything about javascript, JSON, or Aeson, but i'm trying to set the
logLevel
option ontoHtmlFileWith
. everything i try winds up translating to{"logLevel":"vega.Debug"}
, whereas i think the right side (and probably the left side) can't have the quotes. i don't see how to properly indicate that.here's what i've tried:
obviously that makes strings. to go this route, i think you'd have to export a type for the javascript enum from https://github.com/vega/vega/blob/master/packages/vega-util/src/logger.js#L6 but i'm not sure.
and
also makes strings.
searching for how to make literal javascript values comes up with
Data.Aeson.QQ.Simple
, but i can't find any way that compiles that doesn't also quote"vega.Debug"
using a bare
Int
forlogLevel
does work, but is v dirty :(