我是android的新手。 我很困惑如何将此数组转换为JSON数组将其发送到服务器php:
{"menu":[{"id":"2","number":"3"},
{"id":"6","number":"4"},
{"id":"5","number":"6"}],
"user":[{"uid": "12345","number":"imam@imam.com"}],
"table":[{"number":"7"}]}
答案 0 :(得分:0)
只需使用json_decode:
$myArr = json_decode($json); //array('menu' => ..., 'user' => ..., 'table' => ...)