Это мой тестовый пример для разработки англо-кхмерского словаря документов.
<code><?php
error_reporting(E_ALL);
$json ='{
"word": "think",
"khmer" :
[
{
"type":["Verb — past tense: thought ; past participle: thought ; present participle: thinking ; "] ,
"meaning":
[
"(INTRANSITIVE) (to believe, to judge, to form or have in the mind, to determine, to use the mind in order to come to decisions, to anticipate; to call, to mind; to imagine, to conceive, to surmise) គិត, ពិចារណា, រិះគិត, ទ្រង់ព្រះតំរិះ, ទ្រង់ព្រះចិន្ដា",
"(TECHNICAL) គិតមានចេតនាឬផែនការរំពឹង",
],
}
]
"english" :
[
{
"type":["Noun — Plural: Thinks"],
"meaning" :
[
"Act of thinking; a thought.",
],
}
{
"type": ["Verb — past tense: thought ; past participle: thought ; present participle: thinking ; "],
"meaning"
[
"(TRANSITIVE) To seem or appear; -- used chiefly in the expressions methinketh or methinks, and methought.",
"(TRANSITIVE) To employ any of the intellectual powers except that of simple perception through the senses; to exercise the higher intellectual faculties.",
],
}
],
"other" :{
"meaning": [
"To presume, to venture",
"To conceive, to imagine",
],
"synonyms":[],
"antonyms":[],
"phrasalVerbs" :
[
"Think about",
"Think of",
],
"relatedPhrases" :
[
"think again",
"think ahead",
],
},
}';
$data = json_decode($json);
echo "<pre>";
print_r($data);
echo "
";
?>
Когда я пытался запустить этот скрипт, я не получал вывод, как json Object.
Кто-нибудь Может мне помочь с проблемой в моей Json String? или Json Design здесь?
спасибо