Closed rakeshkky closed 7 years ago
Need tojson filter in which {{ info | tojson }} should interpolate JSON value of info while rendering.
{{ info | tojson }}
info
For example, my data type is data Interpolate = Interpolate { info :: Data.Aeson.Object } which is ToJSON instance.
data Interpolate = Interpolate { info :: Data.Aeson.Object }
ToJSON
This should do the trick (documentation here). You still need to provide a ToGVal instance for your type, but that shouldn't be too hard to figure out.
ToGVal
Need tojson filter in which
{{ info | tojson }}
should interpolate JSON value ofinfo
while rendering.For example, my data type is
data Interpolate = Interpolate { info :: Data.Aeson.Object }
which isToJSON
instance.