Skip to content

int64 serialization doesn't match the one in ocaml atdgen-runtime #22

@thatportugueseguy

Description

@thatportugueseguy

When we have a type with an ocaml representation of int64, it doesn't get serialized in the same way as it would in ocaml atdgen-runtime.
ex:

type int64 = int <ocaml repr="int64">

In this example, the value would be returned from the ocaml side as an int in the json response, and the atdgen-codec-runtime would complain that it can't parse that value as it's expecting a string.

Int64 serialization functions:

ocaml atdgen-runtime:

let write_int64 ob x =
  Bi_outbuf.add_string ob (Int64.to_string x)

bs-atdgen-codec-runtime:

let int64 s = string (Int64.to_string s)

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