# [1,"a",true,null] drafts an empty Root

`[1,"a",true,null]` parses. On the [JSON converter](https://kepttools.com/json-converter) it still does not produce a useful TypeScript or PHP schema. Conversion runs in the browser.

Laravel prints a PHP list of the four values. TypeScript prints an empty interface because the first item is a number:

```ts
export interface Root {}
```

The PHP DTO is a stub. Its only body is the comment `Provide a JSON object to generate properties.` CSV clears the output with `CSV conversion expects an array of objects.`

## Object drafts need an object

When the root is an array, TypeScript and the PHP DTO read the first object. A scalar list has no first object. That is the same reason `[]` leaves TypeScript and the PHP class empty, and why CSV refuses both pastes. Laravel can still print `[]` or a list of scalars because it walks the whole value.

For property values on a real object, a whole number such as `1` is `int` on the PHP DTO, `1.5` is `float`, and TypeScript types both as `number`.

## Keep parse errors separate

`{"a":1,}` is not this case. That trailing comma produces `Expected double-quoted property name in JSON at position 7 (line 1 column 8)` and empties every output. Repair it in the [JSON formatter](https://kepttools.com/json-formatter), then convert again. For TypeScript, PHP DTO, or CSV, paste an object or an array of objects.

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