json_encode to hash