Skip to content

specialize Js.Dict.fromArray #2320

Closed
Closed
@bobzhang

Description

@bobzhang

part of #734
Currently there is no way to generate JSON object below:

{ "key1" : value1,
  "key2" : value2}

the closest one is Js.Dict.fromArray : (string * Js.Json.t) array -> Js.Json.t Js.Dict.t) but it results in a runtime call.

Js.Dict.fromArray [ "x", x ; "z", z]

Generated JS should be

{ "x" :  x ,
   "z" : z}

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