Search code examples
jsonamp-stories

AMP-story json bookend issue


I created a Google AMP Story. It's hosted here for testing. The bookendv1.json is not working. Below is the code.

Any help would be greatly appreciated as I'm just learning how to code. I don't know what I'm doing wrong. I followed all the documentation and copied the code exactly from the example provide by Google AMP story guide.

     
      
<amp-story-bookend src= "http://buddhismforkids.github.io/bookendv1.json" layout="nodisplay"></amp-story-bookend>
	  </amp-story>

`


Solution

  • I believe your json is invalid. First, you have 2 lines that are missing a coma :

    "image": "bookend_KidsMeditation.jpg"
    "image": "bookend_meditationhandbook.png"
    

    You also have an error with the line :

    "category": "booklet"
    

    The other element needs to be outside. I suggest you use https://jsonlint.com/ to validate the JSON format first.

    The final result should be :

    https://codeshare.io/5ejvjl

    Hope it helps.