Fixing broken JSON marshalling for struct pointers