Closed
Description
since now BuckleScript has runtime support for type-safe manipulating json objects dynamically(https://github.com/bloomberg/bucklescript/blob/master/jscomp/test/js_json_test.ml), it would be very useful to provide a static json pattern match compiler atop:
match%json x with
| { x : [ a ; { y : [b ; c] } ] } -> blabla
| { x : [ a ; b ; { y : [b ; c] } ] } -> blabla
| [ a ; b ; c ] -> blabla
The implementation would be very fun and make OCaml the best language to manipulate json values dynamically