-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't validate Yojson.Safe.t
abstract type
#263
Comments
Yojson.Safe.t
abstract typeYojson.Safe.t
abstract type
I think this change in yojson is going to break user code no matter what we fix in atdgen, because the user code is Some ideas:
|
We could also have the atdgen runtime provide its own standardized interface for using raw JSON. It would define the JSON type like type json <ocaml module="Yojson.Safe" t="t"> = abstract we would write: type json <ocaml module="JSON"> = abstract where Initially, the interface of JSON/OCaml adapters would also use the standardized This wouldn't break compatibility with legacy atd files since the types |
Perhaps (almost) all of this and more would be solved by having proper module/multifile support in the ATD language. |
I wrote a proposal for managing ATD modules here: #26 |
Yojson rename it's
Yojson.Safe.json
type toYojson.Safe.t
and deprecated the old type. It also removed theYojson.Safe.validate_json
and deliberately not introduced a newYojson.Safe.validate_t
. I have an atd document using the json type, and I'd like to validation for the values produced, but however I write it, I cannot get atd to turn off validation for that type: it always produces code that call the non-existentYojson.Safe.validate_t
function.produces
and
The text was updated successfully, but these errors were encountered: