A key named first-name looks fine in JSON. The drafts do not treat it the same way. On the JSON converter, Laravel quotes it and stays valid. TypeScript and the PHP DTO keep the hyphen in the identifier. Conversion runs in the browser. Nothing is uploaded.
The sample
{"first-name":"Ada","role":"engineer"} Laravel prints valid array syntax: 'first-name' => 'Ada'. TypeScript emits first-name: string;. The PHP DTO emits public string $first-name; and the constructor uses the same name. The class stays DataTransferObject.
That is a draft, not production code. Rename the field before you ship if the hyphen is not legal in your language.
Keep this separate from other mistakes
A trailing comma such as {"a":1,} clears every format. That is a parse error, not a hyphen problem. Repair broken text in the JSON formatter, then convert again.
A nested object under meta becomes interface Meta in TypeScript and public array $meta on the PHP class. A hyphenated key is a different issue: the name itself is copied into the draft.
Guide: https://kepttools.com/guides/json-to-typescript-php-dto-laravel
