database.anubis
1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* Created by PyramIDE.
* User: フランスのトトロ aka (David RENÉ)
* Date: 13/02/2016
* Time: 10:38
* © David RENÉ
*/
transmit app.anubis
transmit tools/basis.anubis
transmit system/muscle.anubis
transmit xlib/message_constants.anubis
transmit xlib/web/json.anubis
transmit hayamiki_lib/model/types/hk_database.anubis
_HK_DATABASE message format:
============================
+-----------+---------------+--------------------------
| name | type | description
+-----------+---------------+--------------------------------
| "name" | String | Name of the database
| "apps" | List(Message) | List of Application of the database the application Message id is _HK_APP
_HK_DATABASE JSON format:
=========================
{
"obj_type": "_HK_DATABASE", //_HK_DATABASE object type describe a database
"name": "XXXX", //name of database
"apps": //list of applications
[
{ "obj_type": "_HK_APP", //_HK_APP object type describe an application
"name" : "app_name" //name of the current application
},
... //anothers applications
]
}
public define JsonValue
to_JSON
(
HK_Database hk_db
)=
json_object(
[ json_member("obj_type", json_string("_HK_DATABASE")),
json_member("name", json_string(hk_db.name)),
json_member("apps", json_array(map((HK_App app) |-> to_JSON(app), hk_db.apps)))
]).