Notícias:

SMF - Just Installed!

Menu principal

erro no json.decod

Iniciado por rafael, Agosto 28, 2017, 05:26:40 PM

tópico anterior - próximo tópico

rafael

Boa noite, estou tendo um problema com o json.decod para esta matriz:



[
{
"mac": "58:10:8C:0D:73:07",
"name": "ELCIONE PEREIR",
"lastip": "0.0.0.0",
"associd": 10,
"aprepeater": 0,
"tx": 26.0,
"rx": 78.0,
"signal": -64,
"rssi": 32,
"chainrssi": [ 30 , 27 , 0 ],
"rx_chainmask": 3,
"ccq": 86,
"idle": 0,
"tx_latency": 18,
"uptime": 171272,
"ack": 32,
"distance": 1500,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[3654,83042,607651,1477318,510535,348901,507585,264507,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 955312,
"rx_bytes": 142819636,
"rx_pps": 55,
"tx_data": 1507368,
"tx_bytes": 1891154263,
"tx_pps": 102
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ -64, -64, -64, -64, -65, -65, 0, 0, 0, 0, 0, 0, -65, -66, -67, -69 ]
},
{
"mac": "58:10:8C:05:19:54",
"name": "ROSELIA LIMA",
"lastip": "0.0.0.0",
"associd": 5,
"aprepeater": 0,
"tx": 117.0,
"rx": 78.0,
"signal": -69,
"rssi": 27,
"chainrssi": [ 24 , 24 , 0 ],
"rx_chainmask": 3,
"ccq": 94,
"idle": 0,
"tx_latency": 20,
"uptime": 874192,
"ack": 28,
"distance": 900,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[29,13,59,19297,131642,1165526,8662417,2857366,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 16272039,
"rx_bytes": 3282813633,
"rx_pps": 28,
"tx_data": 23553807,
"tx_bytes": 27574610883,
"tx_pps": 100
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ 0, -69, -69, -69, -69, -69, 0, 0, 0, 0, 0, 0, -70, -70, -72, 0 ]
},
{
"mac": "00:27:22:B2:3B:84",
"name": "LEIDE",
"lastip": "192.168.10.1",
"associd": 3,
"aprepeater": 0,
"tx": 65.0,
"rx": 19.500,
"signal": -61,
"rssi": 35,
"chainrssi": [ 20 , 35 , 0 ],
"rx_chainmask": 3,
"ccq": 96,
"idle": 0,
"tx_latency": 5,
"uptime": 874163,
"ack": 30,
"distance": 1200,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[0,2,23,394,1047,18092,817019,1673225,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 2899294,
"rx_bytes": 459771501,
"rx_pps": 1,
"tx_data": 3831484,
"tx_bytes": 4017321527,
"tx_pps": 0
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ 0, -61, -61, -61, 0, 0, 0, -61 ],
"remote": {
"uptime": 874194,
"hostname": "LEIDE",
"platform": "AirGrid M5 HP",
"version": "XM.ar7240.v6.0.3.30600.170329.1831",
"signal": -50,
"tx_power": 16,
"rssi": 46,
"chainrssi": [ 47 , 0 , 0 ],
"rx_chainmask": 1,
"tx_latency": 2,
"noisefloor": -91,
"distance": 450,
"time": "2017-04-08 21:20:47",
"cpuload": 0,
"totalram": 29508,
"freeram": 9788,
"netrole": "router",
"tx_bytes": 460237568,
"rx_bytes": 4167485529,
"tx_ratedata":[7530,13616,28940,74290,269840,731283,1179656,329248,0,0]
}
},
{
"mac": "58:10:8C:0C:9A:42",
"name": "ANNA CAROLINA",
"lastip": "0.0.0.0",
"associd": 12,
"aprepeater": 0,
"tx": 6.500,
"rx": 26.0,
"signal": -57,
"rssi": 39,
"chainrssi": [ 38 , 31 , 0 ],
"rx_chainmask": 3,
"ccq": 79,
"idle": 0,
"tx_latency": 17,
"uptime": 32131,
"ack": 34,
"distance": 1800,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[1327264,460254,267086,217583,118507,196798,482899,169262,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 341968,
"rx_bytes": 81551275,
"rx_pps": 68,
"tx_data": 461878,
"tx_bytes": 531390721,
"tx_pps": 106
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ -57, -57, -57, -57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
},
{
"mac": "00:1A:3F:69:75:DD",
"name": "Jorge Cunha",
"lastip": "0.0.0.0",
"associd": 15,
"aprepeater": 0,
"tx": 130.0,
"rx": 39.0,
"signal": -66,
"rssi": 30,
"chainrssi": [ 27 , 26 , 0 ],
"rx_chainmask": 3,
"ccq": 91,
"idle": 0,
"tx_latency": 9,
"uptime": 420645,
"ack": 27,
"distance": 750,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[0,0,0,5106,83699,517215,1119450,256071,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 2407008,
"rx_bytes": 352079430,
"rx_pps": 2,
"tx_data": 3667035,
"tx_bytes": 4378262254,
"tx_pps": 3
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ -65, -66, -66, -66, -67, -66, 0, 0, 0, 0, 0, 0, -67, -67, -68, -69 ]
},
{
"mac": "24:A4:3C:A6:E4:18",
"name": "Posto Policial",
"lastip": "192.168.10.1",
"associd": 4,
"aprepeater": 0,
"tx": 58.500,
"rx": 19.500,
"signal": -60,
"rssi": 36,
"chainrssi": [ 15 , 36 , 0 ],
"rx_chainmask": 3,
"ccq": 80,
"idle": 0,
"tx_latency": 9,
"uptime": 259832,
"ack": 36,
"distance": 2100,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[49401,6961,2256,2590,4129,11790,35030,74925,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 193407,
"rx_bytes": 31274300,
"rx_pps": 2,
"tx_data": 185872,
"tx_bytes": 32258333,
"tx_pps": 1
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ 0, 0, -60, -59, 0, -61, -63, -64 ],
"remote": {
"uptime": 543018,
"hostname": "Posto Policial",
"platform": "AirGrid M5 HP",
"version": "XM.ar7240.v6.0.4.30805.170505.1525",
"signal": -59,
"tx_power": 23,
"rssi": 37,
"chainrssi": [ 38 , 0 , 0 ],
"rx_chainmask": 1,
"tx_latency": 3,
"noisefloor": -88,
"distance": 1200,
"time": "2017-05-11 22:15:11",
"cpuload": 1,
"totalram": 29508,
"freeram": 10508,
"netrole": "router",
"tx_bytes": 63926545,
"rx_bytes": 125557017,
"tx_ratedata":[6367,7871,10452,14094,18493,27038,41603,67703,0,0]
}
},
{
"mac": "00:1A:3F:D0:4F:62",
"name": "Isaias Fernand",
"lastip": "0.0.0.0",
"associd": 17,
"aprepeater": 0,
"tx": 65.0,
"rx": 52.0,
"signal": -65,
"rssi": 31,
"chainrssi": [ 20 , 31 , 0 ],
"rx_chainmask": 3,
"ccq": 92,
"idle": 0,
"tx_latency": 15,
"uptime": 253064,
"ack": 26,
"distance": 600,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[2,31,1187,7228,70392,522788,985949,113147,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 2105908,
"rx_bytes": 258755944,
"rx_pps": 1,
"tx_data": 3210887,
"tx_bytes": 4017773431,
"tx_pps": 2
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ -66, -66, -65, -66, -68, -68, -69, -71 ]
},
{
"mac": "00:1A:3F:CE:AD:78",
"name": "Cicero jacinto",
"lastip": "0.0.0.0",
"associd": 11,
"aprepeater": 0,
"tx": 104.0,
"rx": 78.0,
"signal": -56,
"rssi": 40,
"chainrssi": [ 38 , 35 , 0 ],
"rx_chainmask": 3,
"ccq": 81,
"idle": 1,
"tx_latency": 11,
"uptime": 40363,
"ack": 28,
"distance": 900,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[1777584,1302115,149519,82382,125725,344615,847165,241692,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 1311575,
"rx_bytes": 443563056,
"rx_pps": 0,
"tx_data": 1976958,
"tx_bytes": 2305194752,
"tx_pps": 0
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ 0, 0, 0, -51, -52, -52, 0, 0, 0, 0, 0, 0, -52, -52, -55, -56 ]
},
{
"mac": "00:27:22:A6:7B:97",
"name": "mariaaparecida",
"lastip": "192.168.10.1",
"associd": 2,
"aprepeater": 0,
"tx": 65.0,
"rx": 58.500,
"signal": -58,
"rssi": 38,
"chainrssi": [ 17 , 39 , 0 ],
"rx_chainmask": 3,
"ccq": 98,
"idle": 0,
"tx_latency": 8,
"uptime": 169041,
"ack": 33,
"distance": 1650,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[7,8,13,125,393,7468,264994,479922,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 1251767,
"rx_bytes": 724669098,
"rx_pps": 0,
"tx_data": 1063720,
"tx_bytes": 750573022,
"tx_pps": 0
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ 0, 0, 0, 0, 0, 0, -58, -58 ],
"remote": {
"uptime": 169085,
"hostname": "mariaaparecidalopes",
"platform": "AirGrid M5 HP",
"version": "XM.ar7240.v6.0.3.30600.170329.1831",
"signal": -52,
"tx_power": 17,
"rssi": 44,
"chainrssi": [ 45 , 0 , 0 ],
"rx_chainmask": 1,
"tx_latency": 1,
"noisefloor": -91,
"distance": 600,
"time": "2017-03-31 17:28:58",
"cpuload": 0,
"totalram": 29508,
"freeram": 10164,
"netrole": "router",
"tx_bytes": 725098256,
"rx_bytes": 777052287,
"tx_ratedata":[675,2337,12634,56483,174115,359307,435852,54307,0,0]
}
},
{
"mac": "58:10:8C:0B:D6:FE",
"name": "Benigna",
"lastip": "0.0.0.0",
"associd": 16,
"aprepeater": 0,
"tx": 52.0,
"rx": 26.0,
"signal": -67,
"rssi": 29,
"chainrssi": [ 26 , 25 , 0 ],
"rx_chainmask": 3,
"ccq": 94,
"idle": 0,
"tx_latency": 19,
"uptime": 112891,
"ack": 25,
"distance": 450,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[4988,8944,38503,39610,180932,917744,2607193,253772,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 4645066,
"rx_bytes": 925003261,
"rx_pps": 63,
"tx_data": 6312323,
"tx_bytes": 7764893688,
"tx_pps": 106
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ -67, -67, -67, -67, -69, -69, -71, -73 ]
},
{
"mac": "00:1A:3F:69:77:11",
"name": "VAnuza Pereira",
"lastip": "0.0.0.0",
"associd": 9,
"aprepeater": 0,
"tx": 78.0,
"rx": 78.0,
"signal": -62,
"rssi": 34,
"chainrssi": [ 32 , 29 , 0 ],
"rx_chainmask": 3,
"ccq": 87,
"idle": 0,
"tx_latency": 30,
"uptime": 26684,
"ack": 30,
"distance": 1200,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[0,2,29,9406,9383,12232,18772,6328,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 69183,
"rx_bytes": 46136516,
"rx_pps": 83,
"tx_data": 66609,
"tx_bytes": 42998361,
"tx_pps": 65
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ -63, -63, -62, -63, -63, -64, 0, 0, 0, 0, 0, 0, -64, -64, -66, -68 ]
},
{
"mac": "58:10:8C:0D:72:2F",
"name": "JOSE AIRTON",
"lastip": "0.0.0.0",
"associd": 8,
"aprepeater": 0,
"tx": 117.0,
"rx": 104.0,
"signal": -62,
"rssi": 34,
"chainrssi": [ 33 , 29 , 0 ],
"rx_chainmask": 3,
"ccq": 95,
"idle": 0,
"tx_latency": 18,
"uptime": 17841,
"ack": 31,
"distance": 1350,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[0,0,0,2161,37894,170369,153255,10518,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 425275,
"rx_bytes": 50991302,
"rx_pps": 51,
"tx_data": 567792,
"tx_bytes": 695817393,
"tx_pps": 47
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ -59, -61, -62, -62, -63, -63, 0, 0, 0, 0, 0, 0, -62, -63, -63, -63 ]
},
{
"mac": "58:10:8C:10:75:31",
"name": "ADELINO DE OLI",
"lastip": "0.0.0.0",
"associd": 13,
"aprepeater": 0,
"tx": 117.0,
"rx": 130.0,
"signal": -59,
"rssi": 37,
"chainrssi": [ 37 , 32 , 0 ],
"rx_chainmask": 3,
"ccq": 88,
"idle": 0,
"tx_latency": 14,
"uptime": 10624,
"ack": 31,
"distance": 1350,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[0,0,1,8,23,265,1747,3520,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 4224,
"rx_bytes": 112214,
"rx_pps": 0,
"tx_data": 3297,
"tx_bytes": 165647,
"tx_pps": 0
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ 0, 0, 0, 0, 0, -58, 0, 0, 0, 0, 0, 0, 0, -59, 0, 0 ]
},
{
"mac": "58:10:8C:08:22:0F",
"name": "Fernando volpa",
"lastip": "0.0.0.0",
"associd": 18,
"aprepeater": 0,
"tx": 58.500,
"rx": 26.0,
"signal": -61,
"rssi": 35,
"chainrssi": [ 20 , 35 , 0 ],
"rx_chainmask": 3,
"ccq": 84,
"idle": 0,
"tx_latency": 10,
"uptime": 17763,
"ack": 29,
"distance": 1050,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[652,8325,17960,902,512,1178,3289,3171,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 32544,
"rx_bytes": 3107612,
"rx_pps": 1,
"tx_data": 48082,
"tx_bytes": 55901149,
"tx_pps": 1
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ 0, 0, -61, -61, -62, 0, -64, -66 ]
},
{
"mac": "58:10:8C:0D:B6:AD",
"name": "POSTO SAUDE MA",
"lastip": "0.0.0.0",
"associd": 7,
"aprepeater": 0,
"tx": 130.0,
"rx": 104.0,
"signal": -63,
"rssi": 33,
"chainrssi": [ 32 , 29 , 0 ],
"rx_chainmask": 3,
"ccq": 99,
"idle": 2,
"tx_latency": 24,
"uptime": 290,
"ack": 24,
"distance": 300,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[11,6,11,10,25,137,2139,17234,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 274,
"rx_bytes": 14512,
"rx_pps": 0,
"tx_data": 128,
"tx_bytes": 7185,
"tx_pps": 0
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ 0, 0, 0, 0, -62, 0, 0, 0, 0, 0, 0, 0, -62, -62, -65, -64 ]
},
{
"mac": "00:1A:3F:6B:1E:51",
"name": "Avelina cavalc",
"lastip": "0.0.0.0",
"associd": 14,
"aprepeater": 0,
"tx": 58.500,
"rx": 26.0,
"signal": -54,
"rssi": 42,
"chainrssi": [ 26 , 42 , 0 ],
"rx_chainmask": 3,
"ccq": 96,
"idle": 0,
"tx_latency": 16,
"uptime": 13046,
"ack": 27,
"distance": 750,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[0,0,3,56,1134,11352,51501,15404,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 80986,
"rx_bytes": 10525943,
"rx_pps": 75,
"tx_data": 119919,
"tx_bytes": 139807514,
"tx_pps": 145
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ -54, -54, -54, -55, -57, -56, -58, -60 ]
},
{
"mac": "00:27:22:B0:52:CF",
"name": "rejane marques",
"lastip": "192.168.10.1",
"associd": 20,
"aprepeater": 0,
"tx": 65.0,
"rx": 6.500,
"signal": -73,
"rssi": 23,
"chainrssi": [ 12 , 24 , 0 ],
"rx_chainmask": 3,
"ccq": 75,
"idle": 0,
"tx_latency": 15,
"uptime": 10588,
"ack": 43,
"distance": 3000,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[7007,2131,765,492,438,700,821,594,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 13236,
"rx_bytes": 2215276,
"rx_pps": 0,
"tx_data": 14700,
"tx_bytes": 8485163,
"tx_pps": 0
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ -74, 0, -74, -73, -73, 0, 0, 0 ],
"remote": {
"uptime": 10643,
"hostname": "rejane marques Setor A quadra 4",
"platform": "AirGrid M5 HP",
"version": "XM.ar7240.v6.0.3.30600.170329.1831",
"signal": -67,
"tx_power": 17,
"rssi": 29,
"chainrssi": [ 30 , 0 , 0 ],
"rx_chainmask": 1,
"tx_latency": 11,
"noisefloor": -90,
"distance": 2100,
"time": "2017-03-29 21:28:16",
"cpuload": 0,
"totalram": 29508,
"freeram": 3024,
"netrole": "router",
"tx_bytes": 2265747,
"rx_bytes": 11050583,
"tx_ratedata":[5403,1773,1454,885,668,668,563,238,0,0]
}
},
{
"mac": "24:A4:3C:68:3E:C4",
"name": "VICENTE PEREIR",
"lastip": "0.0.0.0",
"associd": 1,
"aprepeater": 0,
"tx": 19.500,
"rx": 6.500,
"signal": -72,
"rssi": 24,
"chainrssi": [ 4 , 25 , 0 ],
"rx_chainmask": 3,
"ccq": 83,
"idle": 0,
"tx_latency": 9,
"uptime": 8383,
"ack": 40,
"distance": 2700,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[30488,3291,1299,761,771,880,976,421,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 41583,
"rx_bytes": 5082640,
"rx_pps": 2,
"tx_data": 49678,
"tx_bytes": 53222092,
"tx_pps": 1
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ -72, -72, 0, 0, 0, 0, 0, 0 ],
"remote": {
"uptime": 8438,
"hostname": "VICENTE PEREIRA",
"platform": "AirGrid M5 HP",
"version": "XM.ar7240.v6.0.3.30600.170329.1831",
"signal": -69,
"tx_power": 23,
"rssi": 27,
"chainrssi": [ 28 , 0 , 0 ],
"rx_chainmask": 1,
"tx_latency": 8,
"noisefloor": -89,
"distance": 1950,
"time": "2017-03-29 20:51:31",
"cpuload": 2,
"totalram": 29508,
"freeram": 9972,
"netrole": "router",
"tx_bytes": 5154117,
"rx_bytes": 54182311,
"tx_ratedata":[12842,6899,4954,2184,1343,871,439,49,0,0]
}
}
]


rafael

Tentei achar o erro na biblioteca json sem sucesso.

Mas encontrei um jeito de contornar este erro:

O problema estava acontecendo nos número decimais com ponto
então o trecho abaixo adiciona aspas neste caso.

troque(': (%d+%.+%d+),',':\"%1\",')



adalberto

Teria como descrever o erro, aqui fiz o seguinte código e aparentemente deu certo:


s = [[ [
{
"mac": "58:10:8C:0D:73:07",
"name": "ELCIONE PEREIR",
"lastip": "0.0.0.0",
"associd": 10,
"aprepeater": 0,
"tx": 26.0,
"rx": 78.0,
"signal": -64,
"rssi": 32,
"chainrssi": [ 30 , 27 , 0 ],
"rx_chainmask": 3,
"ccq": 86,
"idle": 0,
"tx_latency": 18,
"uptime": 171272,
"ack": 32,
"distance": 1500,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[3654,83042,607651,1477318,510535,348901,507585,264507,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 955312,
"rx_bytes": 142819636,
"rx_pps": 55,
"tx_data": 1507368,
"tx_bytes": 1891154263,
"tx_pps": 102
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ -64, -64, -64, -64, -65, -65, 0, 0, 0, 0, 0, 0, -65, -66, -67, -69 ]
},
{
"mac": "58:10:8C:05:19:54",
"name": "ROSELIA LIMA",
"lastip": "0.0.0.0",
"associd": 5,
"aprepeater": 0,
"tx": 117.0,
"rx": 78.0,
"signal": -69,
"rssi": 27,
"chainrssi": [ 24 , 24 , 0 ],
"rx_chainmask": 3,
"ccq": 94,
"idle": 0,
"tx_latency": 20,
"uptime": 874192,
"ack": 28,
"distance": 900,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[29,13,59,19297,131642,1165526,8662417,2857366,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 16272039,
"rx_bytes": 3282813633,
"rx_pps": 28,
"tx_data": 23553807,
"tx_bytes": 27574610883,
"tx_pps": 100
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ 0, -69, -69, -69, -69, -69, 0, 0, 0, 0, 0, 0, -70, -70, -72, 0 ]
},
{
"mac": "00:27:22:B2:3B:84",
"name": "LEIDE",
"lastip": "192.168.10.1",
"associd": 3,
"aprepeater": 0,
"tx": 65.0,
"rx": 19.500,
"signal": -61,
"rssi": 35,
"chainrssi": [ 20 , 35 , 0 ],
"rx_chainmask": 3,
"ccq": 96,
"idle": 0,
"tx_latency": 5,
"uptime": 874163,
"ack": 30,
"distance": 1200,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[0,2,23,394,1047,18092,817019,1673225,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 2899294,
"rx_bytes": 459771501,
"rx_pps": 1,
"tx_data": 3831484,
"tx_bytes": 4017321527,
"tx_pps": 0
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ 0, -61, -61, -61, 0, 0, 0, -61 ],
"remote": {
"uptime": 874194,
"hostname": "LEIDE",
"platform": "AirGrid M5 HP",
"version": "XM.ar7240.v6.0.3.30600.170329.1831",
"signal": -50,
"tx_power": 16,
"rssi": 46,
"chainrssi": [ 47 , 0 , 0 ],
"rx_chainmask": 1,
"tx_latency": 2,
"noisefloor": -91,
"distance": 450,
"time": "2017-04-08 21:20:47",
"cpuload": 0,
"totalram": 29508,
"freeram": 9788,
"netrole": "router",
"tx_bytes": 460237568,
"rx_bytes": 4167485529,
"tx_ratedata":[7530,13616,28940,74290,269840,731283,1179656,329248,0,0]
}
},
{
"mac": "58:10:8C:0C:9A:42",
"name": "ANNA CAROLINA",
"lastip": "0.0.0.0",
"associd": 12,
"aprepeater": 0,
"tx": 6.500,
"rx": 26.0,
"signal": -57,
"rssi": 39,
"chainrssi": [ 38 , 31 , 0 ],
"rx_chainmask": 3,
"ccq": 79,
"idle": 0,
"tx_latency": 17,
"uptime": 32131,
"ack": 34,
"distance": 1800,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[1327264,460254,267086,217583,118507,196798,482899,169262,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 341968,
"rx_bytes": 81551275,
"rx_pps": 68,
"tx_data": 461878,
"tx_bytes": 531390721,
"tx_pps": 106
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ -57, -57, -57, -57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
},
{
"mac": "00:1A:3F:69:75:DD",
"name": "Jorge Cunha",
"lastip": "0.0.0.0",
"associd": 15,
"aprepeater": 0,
"tx": 130.0,
"rx": 39.0,
"signal": -66,
"rssi": 30,
"chainrssi": [ 27 , 26 , 0 ],
"rx_chainmask": 3,
"ccq": 91,
"idle": 0,
"tx_latency": 9,
"uptime": 420645,
"ack": 27,
"distance": 750,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[0,0,0,5106,83699,517215,1119450,256071,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 2407008,
"rx_bytes": 352079430,
"rx_pps": 2,
"tx_data": 3667035,
"tx_bytes": 4378262254,
"tx_pps": 3
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ -65, -66, -66, -66, -67, -66, 0, 0, 0, 0, 0, 0, -67, -67, -68, -69 ]
},
{
"mac": "24:A4:3C:A6:E4:18",
"name": "Posto Policial",
"lastip": "192.168.10.1",
"associd": 4,
"aprepeater": 0,
"tx": 58.500,
"rx": 19.500,
"signal": -60,
"rssi": 36,
"chainrssi": [ 15 , 36 , 0 ],
"rx_chainmask": 3,
"ccq": 80,
"idle": 0,
"tx_latency": 9,
"uptime": 259832,
"ack": 36,
"distance": 2100,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[49401,6961,2256,2590,4129,11790,35030,74925,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 193407,
"rx_bytes": 31274300,
"rx_pps": 2,
"tx_data": 185872,
"tx_bytes": 32258333,
"tx_pps": 1
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ 0, 0, -60, -59, 0, -61, -63, -64 ],
"remote": {
"uptime": 543018,
"hostname": "Posto Policial",
"platform": "AirGrid M5 HP",
"version": "XM.ar7240.v6.0.4.30805.170505.1525",
"signal": -59,
"tx_power": 23,
"rssi": 37,
"chainrssi": [ 38 , 0 , 0 ],
"rx_chainmask": 1,
"tx_latency": 3,
"noisefloor": -88,
"distance": 1200,
"time": "2017-05-11 22:15:11",
"cpuload": 1,
"totalram": 29508,
"freeram": 10508,
"netrole": "router",
"tx_bytes": 63926545,
"rx_bytes": 125557017,
"tx_ratedata":[6367,7871,10452,14094,18493,27038,41603,67703,0,0]
}
},
{
"mac": "00:1A:3F:D0:4F:62",
"name": "Isaias Fernand",
"lastip": "0.0.0.0",
"associd": 17,
"aprepeater": 0,
"tx": 65.0,
"rx": 52.0,
"signal": -65,
"rssi": 31,
"chainrssi": [ 20 , 31 , 0 ],
"rx_chainmask": 3,
"ccq": 92,
"idle": 0,
"tx_latency": 15,
"uptime": 253064,
"ack": 26,
"distance": 600,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[2,31,1187,7228,70392,522788,985949,113147,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 2105908,
"rx_bytes": 258755944,
"rx_pps": 1,
"tx_data": 3210887,
"tx_bytes": 4017773431,
"tx_pps": 2
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ -66, -66, -65, -66, -68, -68, -69, -71 ]
},
{
"mac": "00:1A:3F:CE:AD:78",
"name": "Cicero jacinto",
"lastip": "0.0.0.0",
"associd": 11,
"aprepeater": 0,
"tx": 104.0,
"rx": 78.0,
"signal": -56,
"rssi": 40,
"chainrssi": [ 38 , 35 , 0 ],
"rx_chainmask": 3,
"ccq": 81,
"idle": 1,
"tx_latency": 11,
"uptime": 40363,
"ack": 28,
"distance": 900,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[1777584,1302115,149519,82382,125725,344615,847165,241692,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 1311575,
"rx_bytes": 443563056,
"rx_pps": 0,
"tx_data": 1976958,
"tx_bytes": 2305194752,
"tx_pps": 0
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ 0, 0, 0, -51, -52, -52, 0, 0, 0, 0, 0, 0, -52, -52, -55, -56 ]
},
{
"mac": "00:27:22:A6:7B:97",
"name": "mariaaparecida",
"lastip": "192.168.10.1",
"associd": 2,
"aprepeater": 0,
"tx": 65.0,
"rx": 58.500,
"signal": -58,
"rssi": 38,
"chainrssi": [ 17 , 39 , 0 ],
"rx_chainmask": 3,
"ccq": 98,
"idle": 0,
"tx_latency": 8,
"uptime": 169041,
"ack": 33,
"distance": 1650,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[7,8,13,125,393,7468,264994,479922,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 1251767,
"rx_bytes": 724669098,
"rx_pps": 0,
"tx_data": 1063720,
"tx_bytes": 750573022,
"tx_pps": 0
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ 0, 0, 0, 0, 0, 0, -58, -58 ],
"remote": {
"uptime": 169085,
"hostname": "mariaaparecidalopes",
"platform": "AirGrid M5 HP",
"version": "XM.ar7240.v6.0.3.30600.170329.1831",
"signal": -52,
"tx_power": 17,
"rssi": 44,
"chainrssi": [ 45 , 0 , 0 ],
"rx_chainmask": 1,
"tx_latency": 1,
"noisefloor": -91,
"distance": 600,
"time": "2017-03-31 17:28:58",
"cpuload": 0,
"totalram": 29508,
"freeram": 10164,
"netrole": "router",
"tx_bytes": 725098256,
"rx_bytes": 777052287,
"tx_ratedata":[675,2337,12634,56483,174115,359307,435852,54307,0,0]
}
},
{
"mac": "58:10:8C:0B:D6:FE",
"name": "Benigna",
"lastip": "0.0.0.0",
"associd": 16,
"aprepeater": 0,
"tx": 52.0,
"rx": 26.0,
"signal": -67,
"rssi": 29,
"chainrssi": [ 26 , 25 , 0 ],
"rx_chainmask": 3,
"ccq": 94,
"idle": 0,
"tx_latency": 19,
"uptime": 112891,
"ack": 25,
"distance": 450,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[4988,8944,38503,39610,180932,917744,2607193,253772,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 4645066,
"rx_bytes": 925003261,
"rx_pps": 63,
"tx_data": 6312323,
"tx_bytes": 7764893688,
"tx_pps": 106
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ -67, -67, -67, -67, -69, -69, -71, -73 ]
},
{
"mac": "00:1A:3F:69:77:11",
"name": "VAnuza Pereira",
"lastip": "0.0.0.0",
"associd": 9,
"aprepeater": 0,
"tx": 78.0,
"rx": 78.0,
"signal": -62,
"rssi": 34,
"chainrssi": [ 32 , 29 , 0 ],
"rx_chainmask": 3,
"ccq": 87,
"idle": 0,
"tx_latency": 30,
"uptime": 26684,
"ack": 30,
"distance": 1200,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[0,2,29,9406,9383,12232,18772,6328,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 69183,
"rx_bytes": 46136516,
"rx_pps": 83,
"tx_data": 66609,
"tx_bytes": 42998361,
"tx_pps": 65
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ -63, -63, -62, -63, -63, -64, 0, 0, 0, 0, 0, 0, -64, -64, -66, -68 ]
},
{
"mac": "58:10:8C:0D:72:2F",
"name": "JOSE AIRTON",
"lastip": "0.0.0.0",
"associd": 8,
"aprepeater": 0,
"tx": 117.0,
"rx": 104.0,
"signal": -62,
"rssi": 34,
"chainrssi": [ 33 , 29 , 0 ],
"rx_chainmask": 3,
"ccq": 95,
"idle": 0,
"tx_latency": 18,
"uptime": 17841,
"ack": 31,
"distance": 1350,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[0,0,0,2161,37894,170369,153255,10518,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 425275,
"rx_bytes": 50991302,
"rx_pps": 51,
"tx_data": 567792,
"tx_bytes": 695817393,
"tx_pps": 47
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ -59, -61, -62, -62, -63, -63, 0, 0, 0, 0, 0, 0, -62, -63, -63, -63 ]
},
{
"mac": "58:10:8C:10:75:31",
"name": "ADELINO DE OLI",
"lastip": "0.0.0.0",
"associd": 13,
"aprepeater": 0,
"tx": 117.0,
"rx": 130.0,
"signal": -59,
"rssi": 37,
"chainrssi": [ 37 , 32 , 0 ],
"rx_chainmask": 3,
"ccq": 88,
"idle": 0,
"tx_latency": 14,
"uptime": 10624,
"ack": 31,
"distance": 1350,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[0,0,1,8,23,265,1747,3520,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 4224,
"rx_bytes": 112214,
"rx_pps": 0,
"tx_data": 3297,
"tx_bytes": 165647,
"tx_pps": 0
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ 0, 0, 0, 0, 0, -58, 0, 0, 0, 0, 0, 0, 0, -59, 0, 0 ]
},
{
"mac": "58:10:8C:08:22:0F",
"name": "Fernando volpa",
"lastip": "0.0.0.0",
"associd": 18,
"aprepeater": 0,
"tx": 58.500,
"rx": 26.0,
"signal": -61,
"rssi": 35,
"chainrssi": [ 20 , 35 , 0 ],
"rx_chainmask": 3,
"ccq": 84,
"idle": 0,
"tx_latency": 10,
"uptime": 17763,
"ack": 29,
"distance": 1050,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[652,8325,17960,902,512,1178,3289,3171,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 32544,
"rx_bytes": 3107612,
"rx_pps": 1,
"tx_data": 48082,
"tx_bytes": 55901149,
"tx_pps": 1
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ 0, 0, -61, -61, -62, 0, -64, -66 ]
},
{
"mac": "58:10:8C:0D:B6:AD",
"name": "POSTO SAUDE MA",
"lastip": "0.0.0.0",
"associd": 7,
"aprepeater": 0,
"tx": 130.0,
"rx": 104.0,
"signal": -63,
"rssi": 33,
"chainrssi": [ 32 , 29 , 0 ],
"rx_chainmask": 3,
"ccq": 99,
"idle": 2,
"tx_latency": 24,
"uptime": 290,
"ack": 24,
"distance": 300,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[11,6,11,10,25,137,2139,17234,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 274,
"rx_bytes": 14512,
"rx_pps": 0,
"tx_data": 128,
"tx_bytes": 7185,
"tx_pps": 0
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ 0, 0, 0, 0, -62, 0, 0, 0, 0, 0, 0, 0, -62, -62, -65, -64 ]
},
{
"mac": "00:1A:3F:6B:1E:51",
"name": "Avelina cavalc",
"lastip": "0.0.0.0",
"associd": 14,
"aprepeater": 0,
"tx": 58.500,
"rx": 26.0,
"signal": -54,
"rssi": 42,
"chainrssi": [ 26 , 42 , 0 ],
"rx_chainmask": 3,
"ccq": 96,
"idle": 0,
"tx_latency": 16,
"uptime": 13046,
"ack": 27,
"distance": 750,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[0,0,3,56,1134,11352,51501,15404,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 80986,
"rx_bytes": 10525943,
"rx_pps": 75,
"tx_data": 119919,
"tx_bytes": 139807514,
"tx_pps": 145
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ -54, -54, -54, -55, -57, -56, -58, -60 ]
},
{
"mac": "00:27:22:B0:52:CF",
"name": "rejane marques",
"lastip": "192.168.10.1",
"associd": 20,
"aprepeater": 0,
"tx": 65.0,
"rx": 6.500,
"signal": -73,
"rssi": 23,
"chainrssi": [ 12 , 24 , 0 ],
"rx_chainmask": 3,
"ccq": 75,
"idle": 0,
"tx_latency": 15,
"uptime": 10588,
"ack": 43,
"distance": 3000,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[7007,2131,765,492,438,700,821,594,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 13236,
"rx_bytes": 2215276,
"rx_pps": 0,
"tx_data": 14700,
"tx_bytes": 8485163,
"tx_pps": 0
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ -74, 0, -74, -73, -73, 0, 0, 0 ],
"remote": {
"uptime": 10643,
"hostname": "rejane marques Setor A quadra 4",
"platform": "AirGrid M5 HP",
"version": "XM.ar7240.v6.0.3.30600.170329.1831",
"signal": -67,
"tx_power": 17,
"rssi": 29,
"chainrssi": [ 30 , 0 , 0 ],
"rx_chainmask": 1,
"tx_latency": 11,
"noisefloor": -90,
"distance": 2100,
"time": "2017-03-29 21:28:16",
"cpuload": 0,
"totalram": 29508,
"freeram": 3024,
"netrole": "router",
"tx_bytes": 2265747,
"rx_bytes": 11050583,
"tx_ratedata":[5403,1773,1454,885,668,668,563,238,0,0]
}
},
{
"mac": "24:A4:3C:68:3E:C4",
"name": "VICENTE PEREIR",
"lastip": "0.0.0.0",
"associd": 1,
"aprepeater": 0,
"tx": 19.500,
"rx": 6.500,
"signal": -72,
"rssi": 24,
"chainrssi": [ 4 , 25 , 0 ],
"rx_chainmask": 3,
"ccq": 83,
"idle": 0,
"tx_latency": 9,
"uptime": 8383,
"ack": 40,
"distance": 2700,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[30488,3291,1299,761,771,880,976,421,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 41583,
"rx_bytes": 5082640,
"rx_pps": 2,
"tx_data": 49678,
"tx_bytes": 53222092,
"tx_pps": 1
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ -72, -72, 0, 0, 0, 0, 0, 0 ],
"remote": {
"uptime": 8438,
"hostname": "VICENTE PEREIRA",
"platform": "AirGrid M5 HP",
"version": "XM.ar7240.v6.0.3.30600.170329.1831",
"signal": -69,
"tx_power": 23,
"rssi": 27,
"chainrssi": [ 28 , 0 , 0 ],
"rx_chainmask": 1,
"tx_latency": 8,
"noisefloor": -89,
"distance": 1950,
"time": "2017-03-29 20:51:31",
"cpuload": 2,
"totalram": 29508,
"freeram": 9972,
"netrole": "router",
"tx_bytes": 5154117,
"rx_bytes": 54182311,
"tx_ratedata":[12842,6899,4954,2184,1343,871,439,49,0,0]
}
}
]

]]



local json = inclua'json'

local t = json.decod(s);


funcao imp(t)
   para i,v em pares(t) inicio
     se tipo(v)=='tabela' entao
       imprima('\nTab:',i,'= {');
       imp(v);
       imprima('}');
     senao
       imprima(i,'=', v,',');
     fim
   fim
fim

imp(t);




O que pode estar acontecendo é que se for imprimir um número com um zero após o ponto decimal ele será arredondado.

Para forçar a saída do zero após o ponto decimal use o string.formate com imprima ou o imprimaf:

imprimaf("%.2f\n\n", 7); //--> 7.00



rafael

O erro é este:



/usr/local/bin/prisma: /usr/local/share/prisma/1.0/plib/json.pris:29: argumento incorreto #3 to 'separe' (espera-se numero, ao inves de string)
Rastro da pilha:
[C]: em funcao 'separe'
/usr/local/share/prisma/1.0/plib/json.pris:29: em funcao 'skip_delim'
/usr/local/share/prisma/1.0/plib/json.pris:118: em funcao 'decod'
/usr/local/share/prisma/1.0/plib/json.pris:124: em funcao 'decod'
./teste.prisma:278: em trecho principal
[C]: em ?


adalberto

Valeu vou dar uma olhada.

Vc fez alguma modificação nesta lib?

No código acima funcionou p mim.

rafael

#5
Eu não modifiquei nada na json.pris porque estava meio apressado.

Ainda não testei com imprimaf

Mas seria bom corrigir na biblioteca, pelo que vi tem um mini manual dizendo alguma coisa sobre isso logo acima da função separadora.

Estou achando que é a versão do prisma.

Quando executo o código abaixo no meu computador com ubuntu16 funciona, mas quando executo no servidor centos7 já não funciona e dá o erro logo abaixo.


s = [[ [
{
"mac": "58:10:8C:0D:73:07",
"name": "ELCIONE PEREIR",
"lastip": "0.0.0.0",
"associd": 10,
"aprepeater": 0,
"tx": 26.0,
"rx": 78.0,
"signal": -64,
"rssi": 32,
"chainrssi": [ 30 , 27 , 0 ],
"rx_chainmask": 3,
"ccq": 86,
"idle": 0,
"tx_latency": 18,
"uptime": 171272,
"ack": 32,
"distance": 1500,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[3654,83042,607651,1477318,510535,348901,507585,264507,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 955312,
"rx_bytes": 142819636,
"rx_pps": 55,
"tx_data": 1507368,
"tx_bytes": 1891154263,
"tx_pps": 102
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ -64, -64, -64, -64, -65, -65, 0, 0, 0, 0, 0, 0, -65, -66, -67, -69 ]
},
{
"mac": "58:10:8C:05:19:54",
"name": "ROSELIA LIMA",
"lastip": "0.0.0.0",
"associd": 5,
"aprepeater": 0,
"tx": 117.0,
"rx": 78.0,
"signal": -69,
"rssi": 27,
"chainrssi": [ 24 , 24 , 0 ],
"rx_chainmask": 3,
"ccq": 94,
"idle": 0,
"tx_latency": 20,
"uptime": 874192,
"ack": 28,
"distance": 900,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[29,13,59,19297,131642,1165526,8662417,2857366,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 16272039,
"rx_bytes": 3282813633,
"rx_pps": 28,
"tx_data": 23553807,
"tx_bytes": 27574610883,
"tx_pps": 100
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ 0, -69, -69, -69, -69, -69, 0, 0, 0, 0, 0, 0, -70, -70, -72, 0 ]
},
{
"mac": "00:27:22:B2:3B:84",
"name": "LEIDE",
"lastip": "192.168.10.1",
"associd": 3,
"aprepeater": 0,
"tx": 65.0,
"rx": 19.500,
"signal": -61,
"rssi": 35,
"chainrssi": [ 20 , 35 , 0 ],
"rx_chainmask": 3,
"ccq": 96,
"idle": 0,
"tx_latency": 5,
"uptime": 874163,
"ack": 30,
"distance": 1200,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[0,2,23,394,1047,18092,817019,1673225,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 2899294,
"rx_bytes": 459771501,
"rx_pps": 1,
"tx_data": 3831484,
"tx_bytes": 4017321527,
"tx_pps": 0
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ 0, -61, -61, -61, 0, 0, 0, -61 ],
"remote": {
"uptime": 874194,
"hostname": "LEIDE",
"platform": "AirGrid M5 HP",
"version": "XM.ar7240.v6.0.3.30600.170329.1831",
"signal": -50,
"tx_power": 16,
"rssi": 46,
"chainrssi": [ 47 , 0 , 0 ],
"rx_chainmask": 1,
"tx_latency": 2,
"noisefloor": -91,
"distance": 450,
"time": "2017-04-08 21:20:47",
"cpuload": 0,
"totalram": 29508,
"freeram": 9788,
"netrole": "router",
"tx_bytes": 460237568,
"rx_bytes": 4167485529,
"tx_ratedata":[7530,13616,28940,74290,269840,731283,1179656,329248,0,0]
}
},
{
"mac": "58:10:8C:0C:9A:42",
"name": "ANNA CAROLINA",
"lastip": "0.0.0.0",
"associd": 12,
"aprepeater": 0,
"tx": 6.500,
"rx": 26.0,
"signal": -57,
"rssi": 39,
"chainrssi": [ 38 , 31 , 0 ],
"rx_chainmask": 3,
"ccq": 79,
"idle": 0,
"tx_latency": 17,
"uptime": 32131,
"ack": 34,
"distance": 1800,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[1327264,460254,267086,217583,118507,196798,482899,169262,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 341968,
"rx_bytes": 81551275,
"rx_pps": 68,
"tx_data": 461878,
"tx_bytes": 531390721,
"tx_pps": 106
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ -57, -57, -57, -57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
},
{
"mac": "00:1A:3F:69:75:DD",
"name": "Jorge Cunha",
"lastip": "0.0.0.0",
"associd": 15,
"aprepeater": 0,
"tx": 130.0,
"rx": 39.0,
"signal": -66,
"rssi": 30,
"chainrssi": [ 27 , 26 , 0 ],
"rx_chainmask": 3,
"ccq": 91,
"idle": 0,
"tx_latency": 9,
"uptime": 420645,
"ack": 27,
"distance": 750,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[0,0,0,5106,83699,517215,1119450,256071,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 2407008,
"rx_bytes": 352079430,
"rx_pps": 2,
"tx_data": 3667035,
"tx_bytes": 4378262254,
"tx_pps": 3
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7", "MCS8", "MCS9", "MCS10", "MCS11", "MCS12", "MCS13", "MCS14", "MCS15" ],
"signals": [ -65, -66, -66, -66, -67, -66, 0, 0, 0, 0, 0, 0, -67, -67, -68, -69 ]
},
{
"mac": "24:A4:3C:A6:E4:18",
"name": "Posto Policial",
"lastip": "192.168.10.1",
"associd": 4,
"aprepeater": 0,
"tx": 58.500,
"rx": 19.500,
"signal": -60,
"rssi": 36,
"chainrssi": [ 15 , 36 , 0 ],
"rx_chainmask": 3,
"ccq": 80,
"idle": 0,
"tx_latency": 9,
"uptime": 259832,
"ack": 36,
"distance": 2100,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[49401,6961,2256,2590,4129,11790,35030,74925,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 193407,
"rx_bytes": 31274300,
"rx_pps": 2,
"tx_data": 185872,
"tx_bytes": 32258333,
"tx_pps": 1
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ 0, 0, -60, -59, 0, -61, -63, -64 ],
"remote": {
"uptime": 543018,
"hostname": "Posto Policial",
"platform": "AirGrid M5 HP",
"version": "XM.ar7240.v6.0.4.30805.170505.1525",
"signal": -59,
"tx_power": 23,
"rssi": 37,
"chainrssi": [ 38 , 0 , 0 ],
"rx_chainmask": 1,
"tx_latency": 3,
"noisefloor": -88,
"distance": 1200,
"time": "2017-05-11 22:15:11",
"cpuload": 1,
"totalram": 29508,
"freeram": 10508,
"netrole": "router",
"tx_bytes": 63926545,
"rx_bytes": 125557017,
"tx_ratedata":[6367,7871,10452,14094,18493,27038,41603,67703,0,0]
}
},
{
"mac": "00:1A:3F:D0:4F:62",
"name": "Isaias Fernand",
"lastip": "0.0.0.0",
"associd": 17,
"aprepeater": 0,
"tx": 65.0,
"rx": 52.0,
"signal": -65,
"rssi": 31,
"chainrssi": [ 20 , 31 , 0 ],
"rx_chainmask": 3,
"ccq": 92,
"idle": 0,
"tx_latency": 15,
"uptime": 253064,
"ack": 26,
"distance": 600,
"txpower": 23,
"noisefloor": -88,
"tx_ratedata":[2,31,1187,7228,70392,522788,985949,113147,0,0],
"airmax": {
"priority": 0,
"quality": 0,
"beam": -1,
"signal": 0,
"capacity": 0
},
"stats": {
"rx_data": 2105908,
"rx_bytes": 258755944,
"rx_pps": 1,
"tx_data": 3210887,
"tx_bytes": 4017773431,
"tx_pps": 2
},
"rates": [ "MCS0", "MCS1", "MCS2", "MCS3", "MCS4", "MCS5", "MCS6", "MCS7" ],
"signals": [ -66, -66, -65, -66, -68, -68, -69, -71 ]
}

]

]]



local json = inclua'json'

tab, err = json.decod(s);

se nao tab entao erro(err) fim;

para r,f em pares(tab) inicio
imprima(r,tab[r].mac,tab[r].name,tab[r].signal,tab[r].stats.tx_bytes)

MAC = tab[r].mac
Nome = tab[r].name
Sinal = tab[r].signal
Qualidade = tab[r].ccq
Latencia = tab[r].tx_latency
TXMbps = tab[r].tx
RXMbps = tab[r].rx
TXBytes = tab[r].stats.tx_bytes
RXBytes = tab[r].stats.rx_bytes

TempoLigado = tab[r].uptime


fim




Erro do Centos7:


[root@aurora ~]# ./teste.prisma
./teste.prisma: line 1: s: comando não encontrado
./teste.prisma: line 816: erro de sintaxe próximo do `token' não esperado `]]'
./teste.prisma: line 816: `]]'
[root@aurora ~]# ./teste.prisma
./teste.prisma: line 1: s: comando não encontrado
./teste.prisma: line 816: erro de sintaxe próximo do `token' não esperado `]]'
./teste.prisma: line 816: `]]'



Estou usando a versão 1.0.100 em ambos, vou atualizar pra ver se resolve.

adalberto

Rafael, acho que já encontrei o erro.

No terminal use o seguinte comando:

prisma  teste.prisma    no lugar de :  ./teste.prisma

ou caso queira usar o comando "./teste.prisma" então insira na primeira linha do script prisma:

#!/usr/local/bin/prisma

Tenta aí e me retorna, até mais.

PS.: isso ocorre pelo fato de chamar um script como executável sem colocar o caminho do interpretador na primeira linha do script, ok.

rafael

#7
Oi Adalberto, obrigado pelo retorno.

Fiz vários testes aqui, inclusive este que citou, e cheguei a conclusão que é a seguinte linha:


sis.deflocal("pt_BR.UTF-8")


Eu sempre uso essa linha nos meus programas para interpretar os erros em português e também porque só uso UTF8

quando tirei essa função, o json funcionou.

adalberto

Sim, comprovei o mesmo aqui, mas ainda não encontrei uma forma de solucionar isso.