It should be noted that each CMS differs listed here. it doesn't make any difference the place inside the page (for instance header or footer) you position the code.
JSON-LD is what Google recommends where ever https://nicolelmuh760907.ageeksblog.com/28228824/a-simple-key-for-advanced-schema-markup-unveiled