News for hackers. Stuff that matters.
Re:Why static languages suffer from complexity by nyberg on Wednesday January 19, 2022 @01:46PM (#29998132)

  const Json = union(enum) {
      null,
      number: f64,
      bool: bool,
      string: []const u8,
      array: []const Json,
      object: HashMap([]const u8, Json),
  };

Usually it's a tagged union of the base JSON types which can easily be consumed by most statically typed languages or a variant of it.

EDIT: added "tagged"

There are no comments on this comment yet.