On Wednesday, 4 August 2021 at 04:51:48 UTC, Brian Tiffin wrote:
With `import std.json` working for the other symbols like
parseJSON?
`gdc-11 (Ubuntu 11.1.0-1ubuntu1~18.04.1) 11.1.0`
Have good.
You are using GDC 11, which has an older version of the frontend.
GDC is pretty great for targeting a variety of platform and
having a very stable compiler, but it comes with the downside
that it is updated less frequently (tied to GCC releases) and the
docs may get outdated.
JSONType used to be named `JSON_TYPE`, and this was changed in
v2.082.0. I think GDC-11 is somewhere around v2.076.0 (with a lot
of backport for bugs, but no feature / Phobos backport). Since
v2.082.0 was released 2018-09-02 (almost 3 years ago), the
documentation has long moved.
TL;DR: Use `JSON_TYPE`.
Note that you can quickly get LDC / DMD setup with the install
script, or d-apt (https://d-apt.sourceforge.io/).