The way we are posting Json data to the server is by having a named parameter with the Json data. So your example:

Json postRegister(Json data) {
    import std.typecons;
    
    Nullable!int a;
    Nullable!int b;
            
    a.deserializeJson(data.a);
    b.deserializeJson(data.b);
    
    return data; // This will return a mirror of what was posted.
}

Then you should be able to post like this:

curl -k -H 'content-type: application/json' -X POST -d '{data: {"a":null,"b":1}}' 'http://localhost:8080/api/register'

And null should be accepted as valid JSON data (or it can be left out). It all depends on the way you want your API to work. Sorry I haven't had a chance to actually compile what I have written, but hopefully you can take something from it.