HipJSON: A high performance implementation of JSON parser with std.json syntax. Used by Redub and Hipreme Engine

Dennis dkorpel at gmail.com
Thu Oct 30 16:40:54 UTC 2025


On Thursday, 30 October 2025 at 13:02:16 UTC, Hipreme wrote:
> Redub uses a cache system in which the hash of an object 
> becomes a key. This does not translate well to structs as they 
> are "random" keys. (...)

So you have several use cases where the keys are not a small set 
known ahead of time, but constructed dynamically. Makes sense, 
though now I wonder why you would use JSON for your cache or 
filesystem when performance is such a concern. Or when it's not a 
concern, why std.json doesn't suffice.

> There is another case in which the dynamic type API is kinda 
> important, which is mostly when you do union types, so one 
> would still need a good representation of it:

You could define:

```D
struct Input
{
     string keyboard;
     string gamepad;
     string analog;
     string axis;
}
```

And then check the length of those strings to see if they have a 
value.

Either way, it's still useful to have a fast JSON parser using 
dynamic objects, and using std.json's API makes it an easy 
upgrade.


More information about the Digitalmars-d-announce mailing list