I deduce value from mysqld json , through php . But the problem is that json is not quite valid.
The problem is that there is no comma between the brackets.
It turns out json this type:
{ { "id": "1", "tag_name": "span", } { "id": "2", "tag_name": "div" } } And you need this:
{ { "id": "1", "tag_name": "span", }, { "id": "2", "tag_name": "div" } } Here is an example of my code:
$json_data = array('id' => $row['id'], 'tag_name' => $row['tag_name']); json_encode($json_data); How to make valid json ?