quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

[BUG]: Can't convert to PHP

Open skeul opened this issue 1 year ago • 1 comments

Issue Type

Can't convert JSON to PHP code

Context (Environment, Version, Language)

Input Format: json schema Output Language: PHP

CLI, npm, or app.quicktype.io: app.quicktype.io Version: https://app.quicktype.io/

Description

Input Data

{
          "id": 3,
          "parametre": "param7",
          "valeur": "56.78",
          "matricule": "AZR",
          "date_application": "2023-10-07",
          "date_creation": "2023-10-07 18:00:00",
          "matricule_creation": "LUA",
          "libelle": "Libelle Param 7",
          "type_valeur": "decimal",
          "parametre_general": 0,
          "parametre_collaborateur": 1
    }

Expected Behaviour / Output

i wan't PHP output

class Parametres extends BaseModel
    {
....

}

Current Behaviour / Output

Error js in console :

Uncaught SyntaxError: expected expression, got '<' in mode-mode.js

Steps to Reproduce

  1. Paste input
  2. Switch language to PHP

Possible Solution

skeul avatar Nov 19 '24 11:11 skeul

+1

relliv avatar May 21 '25 07:05 relliv