Skip to content

to_json / of_yojson attribute example doesn't compile #114

@gs0510

Description

@gs0510

The compilation of the example here fails with

File "_none_", line 1:
Error: Unbound value StringMap.to_yojson

My workaround right now is to define:

type attrs = string StringMap.t
let attrs_to_json m = StringMap.bindings m |> [%to_yojson: (string * string) list]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions