# null becomes mixed on the PHP DTO

Null property values stay in the paste. On the [JSON converter](https://kepttools.com/json-converter) the four formats still do not type them the same way. Conversion stays in the browser.

```json
{"name":null,"age":null,"meta":null}
```

Laravel writes `null` for each key. TypeScript types each field as `null`. The PHP DTO types each property as `mixed`. CSV prints the headers and leaves an empty row underneath.

## Null is not a nested object

When `meta` holds `{"active":true}`, TypeScript emits `interface Meta` and the field is `meta: Meta`. The PHP DTO still types that nest as `public array $meta` with no child class. When `meta` is JSON `null`, there is no nest to name. TypeScript keeps `null`. PHP uses `mixed`.

## Missing key vs null value

A missing key is assigned with `?? null` in the PHP constructor, even on `public int $id`. An explicit JSON null is a present key whose value is null, and that property is drafted as `mixed` on the PHP class. The class name remains `DataTransferObject`.

Treat the output as a draft. Rename the class, and decide whether `mixed` or a narrower null type belongs in the code you ship.

Guide: <https://kepttools.com/guides/json-to-typescript-php-dto-laravel>
