When I copy/paste JSON-LD example from Google Documentation (code-snippet below) I get an error in the Structured Data Testing Tool:
http://www.
It appears the testing tool assumes example.com as its domain.
When testing if you can update your url to "www.example.com" it will validate successfully.