coq-serapi
coq-serapi copied to clipboard
[serapi] Parametric serialization support / JSON support
As discussed in chat rooms, we would like to provide a JSON interface to SerAPI; more generally, we would like to make the main code parametric w.r.t. serialization method so people could plug new serializers.
In general, this won't be an easy task. A few considerations:
-
sercomp
may be easier to handle, as discussed with @palmskog ; it should be easy to add a new option; however JSON support is not yet complete, for example I think plugins are missing. - regarding SerAPI protocol, there are two main choices:
- parameterize the code with a serializer parameter, for example by making it a functor
- supporting several formats simultaneously, extending
PpSer
to take an argument.
It is not clear to me yet what should we do w.r.t. this last point.
Serlib does provide json serializers for 0.7.0, delaying this to 0.8.0 for now.
Hey Emilio! As a follow-up on https://github.com/janestreet/sexplib/issues/25, any chance to add JSON support to sertop
?
Yes, it is pretty advanced, as a side effect of the direct python support. Unfortunately I found some problems with ppx_python / pythonlib
so it got a bit delayed, but hopefully that goes into the next release.