Update JSON.php

Fix #1042
Merge pull request #1047 from andig/3.7

Update JSON.php
issues-1048: Added sample for ArrayAccess object and tests that verify ArrayHasKey constraint
issues-1048: Fixed ArrayHasKey constraint
Merge pull request #1049 from Verber/issues-1048-replace-implicit-array_key_exists-in-PHPUnit_Framework_Constraint_ArrayHasKey

Issues 1048: Replace implicit array_key_exists in PHPUnit_Framework_Constraint_ArrayHasKey with offsetExists for ArrayAccess objects