【发布时间】:2018-12-04 05:38:23
【问题描述】:
我正在尝试学习 ReasonML,并按照 bs-json 的示例,我们可以将原始 json 解码为如下类型:
type point = {
x: float,
y: float
};
module Decode = {
let point = json =>
Json.Decode.{
x: json |> field("x", float),
y: json |> field("y", float)
};
}
我对@987654322@ 是什么感到有些困惑。我知道我们可以使用.() 点括号将范围打开到模块中,但我以前没有见过这个点花括号。
【问题讨论】:
标签: module reason bucklescript bs-json