Autor Zpráva
Nailen
Profil
Zdravím. Aktuálně si nevím rady s tímto zápisem.

Vycházím z úplně čistého základního kódu.

<!DOCTYPE html>
<html>
<body>

<?php echo "The Best PHP Examples"; ?>

</body>
</html> 

Do tohoto kódu potřebuji zapsat do části body toto:

{
  "name": "nazev",
  "address": {
    "streetAddress": "Legerova 12",
    "city": "Prague",
    "zip": "110 00"
  },
  "phones": [
    "+420 223 112 456",
    "+420 223 112 457"
  ]
}

Dále potřebuji vložit následující schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "branch name"
    },
    "address": {
      "type": "object",
      "properties": {
        "streetAddress": {
          "type": "string",
          "description": "street and number"
        },
        "city": {
          "type": "string"
        },
        "zip": {
          "type": "string"
        }
      },
      "required": [
        "streetAddress",
        "city",
        "zip"
      ],
      "description": "branch address"
    },
    "phones": {
      "type": "array"
    },   
  },
  "required": [
    "name",
    "address",
    "phones"
  ]
}

Jak přesně tento k´d správně vložit, aby mi stránka nekončila errory? Děkuji za radu.
Nailen
Profil
Ruším tento dotaz. Prosím admina o smazání. Děkuji

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0