Formateurs & Code
JSON vers Modèle de Schéma Prisma
Generate a Prisma model block from a JSON sample.
Note de la rédaction
Understanding · A schema, not just a type.
Ce chapitre approfondi n'est actuellement disponible qu'en anglais. L'outil de conversion ci-dessus fonctionne dans votre langue ; le long article explicatif n'a pas encore été traduit.
Questions fréquentes
Quick answers.
›How does it map JSON types to Prisma?
JSON strings are mapped to `String`, numbers to `Int` or `Float`, and booleans to `Boolean`. If a string matches an ISO date format, it will be mapped to `DateTime`.
›Can it handle nested JSON objects?
Yes. It will identify nested objects and arrays, though you may need to manually define the matching relation names within your main `schema.prisma` file.
›Is my JSON data secure?
Your data never leaves your computer. The conversion logic is executed entirely within your browser's JavaScript engine.
›Does it generate database-specific attributes?
It generates standard Prisma scalar types. You can manually add specific attributes like `@id`, `@default(autoincrement())`, or `@map()` after generating the base model.
Les internautes recherchent aussi
Outils similaires
More in this room.
- JSON vers React Hook Form + ZodSchéma de formulaire typé et hook useForm à partir d'une forme JSON.
- JSON vers Next.js Server ActionServer Action avec parsing Zod et revalidatePath.
- JSON vers Schéma Drizzle ORMDéfinition pgTable Drizzle avec $inferSelect / $inferInsert.
- JSON vers Entité TypeORMClasse TypeORM @Entity avec décorateurs et un identifiant généré.
- JSON vers Mongoose Schema + ModèleSchéma Mongoose + modèle avec timestamps et types.
- JSON vers Routeur tRPCÉchafaudage de routeur tRPC avec entrée Zod — liste, parId, créer.