Not for even the simplest schemas.
Eg, given even the type:
{"aLongerKey": "value"}
The generation prefix: {"a
would by your algorithm produce the following invalid output: {"a}