Conversation
For compatibility with atdgen validation and untypable JSON. e.g. `type json <ocaml module="Yojson.Safe" t="t"> = abstract`
|
The type In fact, I feel like we should probably also remove |
|
Got it. I’m happy to remove |
|
I think in such case it would be more reasonable to define a module that wraps Yojson.Safe.t in your code and provides |
|
Agreed. This seems like a good opportunity to break this connection between the two libraries since it is really an atdgen concern. |
|
Closing this in favor of #136. Thanks @metanivek for pointing our attention to the fact that we have old left-over code that doesn't work, let's make 2.0.0 the best release we can. |
|
@Leonidas-from-XIV happy to help! |
|
Just had the same problem. Could you explain how to turn off the validation for the json type? Every combination I'm using turn out to be wrong with the code atdgen.2.2.1 generates. |
|
@MisterDA I missed your comment previously, but I came back to this the other day and realized it wasn't working. I made a PR that should fix this as of atdgen.2.9.1 release. 🎉 |
While experimenting with atdgen, I came across an edge case when trying validations and untypable JSON.
If I use the following, I get a build warning about deprecation of the
jsontype.If I add an explicit type (
t="t") to address the warning, compilation fails withUnbound value Yojson.Safe.validate_t, so this PR adds it. Since it appears that thejsontype is disappearing, I also madevalidate_jsonan alias tovalidate_tas the canonical definition.