Closed tomjridge closed 7 years ago
I think you should do as you've suggested and use the String constructor. Jsonm is supported exactly the same way anyway, so you're not missing out on anything.
The body type could really use to be abstract at this point so that using yojson doesn't feel second class. But there really isn't a difference in practice.
I don't think functorizing makes sense as there's really only 1 function that uses this Json constructor of body anyway.
Cool. For the record, opium is fantastic.
ppx_deriving_yojson is pretty useful. Ezjsonm and jsonm don't seem to have equivalents. Would it be possible to somehow functorize over the json implementation? Obviously I can just pass yojson-as-string but this feels a bit hacky.