7_API REFERENCE MANUAL
OJMAR 179
7.6
ANEXO
7.6.1
Generate and read JSON files
7.6.1.1
PHP
PHP has a function to create JSON string from an array. string json_encode (mixed
$value [,int $options = 0 [, int $depth = 512 ]] )
Example:
<?php
$arr = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' =>
5);
echo json_encode($arr);
?>
The above example would be:
{"a":1,"b":2,"c":3,"d":4,"e":5}
PHP has another function to decode JSON string and return an array.
mixed
json_decode ( string $json [, bool $assoc = false [, int
$depth = 512 [, int $options = 0]]] )
Example:
<?php
$json = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
var_dump(json_decode($json, true));
?>
The above example would be:
array(5) {
["a"] => int(1)
["b"] => int(2)
["c"] => int(3)
["d"] => int(4)
["e"] => int(5)
}
Summary of Contents for Nexo NLX1
Page 1: ...E S P INSTRUCTIONS MANUAL VERSION 2 0 NEXO NLX1 SYSTEM...
Page 2: ......
Page 3: ...INSTRUCTIONS MANUAL VERSION 1 0 NEXO NLX1 SYSTEM...
Page 7: ...CONTENTSOJMAR 7 PAGE LEFT BLANK INTENTIONALLY...
Page 39: ...2_MANUAL DE INSTALACI N OJMAR 39 PAGE LEFT BLANK INTENTIONALLY...
Page 57: ...3_PUESTA EN MARCHA OJMAR 57 PAGE LEFT BLANK INTENTIONALLY...
Page 62: ...5_MANUAL DE MANTENIMIENTO 1 2 3 User key master or service 4...
Page 70: ...5_MANUAL DE MANTENIMIENTO...
Page 74: ...5_MANUAL DE MANTENIMIENTO PAGE LEFT BLANK INTENTIONALLY...
Page 150: ...7_API REFERENCE MANUAL options BT group 1 range_from 1 range_to 100...
Page 184: ...7_API REFERENCE MANUAL PAGE LEFT BLANK INTENTIONALLY...
Page 186: ...7_API REFERENCE MANUAL Option b...
Page 187: ...7_API REFERENCE MANUAL OJMAR 187 Option c INSTALLING ONE ROUTER PER 50 LOCKS IS RECOMMENDED...
Page 188: ...7_API REFERENCE MANUAL...