Anybody out there interested in critiquing a type system (for JSON)?

I don’t know where else to ask this question, so guess I’ll ask it here. I’ve been devising a type system for JSON, along with an implementation, and it seems like it’s time to get some feedback. I’m most of the way thru the implementation, and am starting to write the README (which, for sure, will be cut into multiple files).

This post is an invitation to find people willing to … read it quickly, not spend much time, and send brutal feedback. I mean … brutal, I’m OK with that.

At a high level, this type system is:

  • equipotent with JSON schema (and the implementation includes code to convert JSON Schema to this type system)
  • based on union/intersection typing (for those who recognize the names: I think the work of Dezani-Ciancaglini, Corrado Bohm, and a few others, is probably relevant; for now, I’m working off memory, though at some point I have to find a way to get access to the LNCS papers, ugh)
  • should be somewhat familiar to people who work with ML, e.g. OCaml/SML modules
  • My plan is that, using union/intersection typing, I can produce a type system that allows for “compiling down” complex schema into low-level schema, for which a sort of “machine code” can be produced for JSON validation.
  • Some of the (ahem) more “esoteric” features of JSON schema, I hope can be profitably modeled using stuff like ML functors.

OK. Enough blather. Here’s a link: GitHub - chetmurthy/utjson: Union Typing for JSON

If anybody looks at this and is interested, send me a DM with your email, and I’ll reply.

4 Likes

Hi Chet, I am sure that specialists here like to criticise type systems (but I am not an expert in JSON). Have you considered sending something to say the ML workshop? I see the keywords type and module so it is clearly in scope :wink: Reviewers tend to be considerate, and it need not be too polished. (Also let me know if you need access to the Springer papers.)

2 Likes