Line data Source code
1 : #pragma once
2 :
3 : #include <prefixdb/api/has.hpp>
4 : #include <prefixdb/api/fields_json.hpp>
5 : #include <prefixdb/api/common_status_json.hpp>
6 : #include <wfc/json.hpp>
7 :
8 : namespace wamba { namespace prefixdb {
9 :
10 : namespace request
11 : {
12 : struct has_json
13 : {
14 0 : JSON_NAME(prefix)
15 0 : JSON_NAME(fields)
16 0 : JSON_NAME(snapshot)
17 : typedef wfc::json::object<
18 : has,
19 : wfc::json::member_list<
20 : wfc::json::member<n_snapshot, has, size_t, &has::snapshot>,
21 : wfc::json::member<n_prefix, has, std::string, &has::prefix>,
22 : wfc::json::member<n_fields, has, key_list_t, &has::fields, key_list_json >
23 : >
24 : > type;
25 : typedef type::target target;
26 : typedef type::serializer serializer;
27 : typedef type::member_list member_list;
28 : };
29 :
30 : }
31 :
32 : namespace response
33 : {
34 : struct has_json
35 : {
36 0 : JSON_NAME(prefix)
37 0 : JSON_NAME(status)
38 0 : JSON_NAME(fields)
39 :
40 : typedef wfc::json::object<
41 : has,
42 : wfc::json::member_list<
43 : wfc::json::member<n_prefix, has, std::string, &has::prefix>,
44 : wfc::json::member<n_status, has, common_status, &has::status, common_status_json>,
45 : wfc::json::member<n_fields, has, field_list_t, &has::fields, fields_list_json>
46 : >
47 : > type;
48 : typedef type::target target;
49 : typedef type::serializer serializer;
50 : typedef type::member_list member_list;
51 : };
52 : }
53 :
54 : }}
|