| | 1 | [[PageOutline(2)]] |
| | 2 | |
| | 3 | = Json de entrada = |
| | 4 | |
| | 5 | == Tener en cuenta == |
| | 6 | |
| | 7 | Las variables o datos deben estar contenidas entre '''*''', en el generador de reportes se cambiaran por comillas dobles. |
| | 8 | |
| | 9 | La llave de la variable y el valor estan separados por los dos puntos ''':'''. Para anexar varios valores se encierra entre '''{ ... }''' (corchetes), y entre estos las diferentes variables separados por coma. |
| | 10 | |
| | 11 | == Variable data == |
| | 12 | |
| | 13 | La variable data es de tipo array, posee varios elementos en si misma. |
| | 14 | |
| | 15 | El contenido general del [http://www.json.org/ Json] se guarda en el data, se anexaran en variables diferentes separados por '''{ . }''', entre un |
| | 16 | |
| | 17 | {{{ |
| | 18 | "data": [ |
| | 19 | |
| | 20 | { ... }, |
| | 21 | { ... } |
| | 22 | |
| | 23 | ] |
| | 24 | }}} |
| | 25 | |
| | 26 | Cada elemento del array contendrĂ¡ los datos necesarios para consumir el servicio. |
| | 27 | |
| | 28 | == Variable Url == |
| | 29 | |
| | 30 | La variable url posee |
| | 31 | |
| | 32 | {{{ |
| | 33 | "url": "http://localhost/contab/web/api_dev.php/api/balance_consol/list.json" |
| | 34 | }}} |
| | 35 | |
| | 36 | == Variable filters == |
| | 37 | |
| | 38 | {{{ |
| | 39 | "filters": |
| | 40 | { |
| | 41 | "id_cia" : "1", |
| | 42 | "id_vigencia" : "2011", |
| | 43 | "id_periodo_contable" : "1", |
| | 44 | "_startRow" : "0", |
| | 45 | "_endRow" : "10" |
| | 46 | } |
| | 47 | }}} |
| | 48 | |
| | 49 | == Variable fields == |
| | 50 | |
| | 51 | {{{ |
| | 52 | "fields": |
| | 53 | { |
| | 54 | "cuenta" : "Cuenta", |
| | 55 | "auxiliar" : "Auxiliar", |
| | 56 | "subauxiliar" : "SubAuxiliar", |
| | 57 | "tercero" : "Tercero", |
| | 58 | "nombre_cuenta" : "Nombre" |
| | 59 | } |
| | 60 | }}} |
| | 61 | |
| | 62 | == Variable fieldsType == |
| | 63 | |
| | 64 | {{{ |
| | 65 | "fieldsType": |
| | 66 | { |
| | 67 | "saldo_anterior" : "money", |
| | 68 | "mvto_debito" : "money", |
| | 69 | "mvto_credito" : "money", |
| | 70 | "nuevo_saldo" : "money", |
| | 71 | "saldo_actual" : "money" |
| | 72 | } |
| | 73 | }}} |