Skip to content

static json pattern match compiler #734

Closed
@bobzhang

Description

@bobzhang

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleOld issues that went stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions