1man(1)                       jsonrpcstub man page                       man(1)
2
3
4

NAME

6       jsonrpcstub - genearate stubs for the libjson-rpc-cpp framework.
7

SYNOPSIS

9       jsonrpcstub specfile.json [--cpp-server=namespace::ClassName]
10        [--cpp-server-file=classqname.h]   [--cpp-client=namespace::ClassName]
11       [--cpp-client-file=classname.h]  [--js-client=ClassName]  [--js-client-
12       file=classname.js]    [--py-client=ClassName]  [--py-client-file=class‐
13       name.py] [-h] [-v] [--version]
14

DESCRIPTION

16       jsonrpcstub is a tool to generate C++, JavaScript, and  Python  classes
17       from a procedure specification file.
18
19   SPECIFICATION SYNTAX
20       The specifictaion file is a JSON file containing all available JSON-RPC
21       methods and  notifications  with  their  corresponding  parameters  and
22       return values contained in a top-level JSON array.
23
24       [
25            {
26                 "name": "method_with_positional_params",
27                 "params": [3,4],
28                 "returns": 7
29            },
30            {
31                 "name": "method_with_named_params",
32                 "params": {"param1": 3, "param2": 4},
33                 "returns": 7
34            },
35            {
36                 "name": "notification_without_parmas"
37            }
38       ]
39
40
41       The  literal in each "params" and  "returns" section defines the corre‐
42       sponding type.  If the "params" contains an array, the  parameters  are
43       accepted  by  position,  if it contains an object, they are accepted by
44       name.
45
46

OPTIONS

48       -h     Print usage information.
49
50       -v     Print verbose information during generation.
51
52       --version
53              Print version info and exit.
54
55       --cpp-server=ClassName
56              Creates a Abstract Server  class.  Namespaces  can  be  provided
57              using the :: notation (e.g. ns1::ns2::Classname).
58
59       --cpp-server-file=filename.h
60              Defines  the  filename  to  use when generating the C++ Abstract
61              Server class.  If this is not provided, the lowercase  classname
62              is used.
63
64       --cpp-client=ClassName
65              Creates a C++ client class. Namespaces can be provided using the
66              :: notation (e.g. ns1::ns2::Classname).
67
68       --cpp-client-file=filename.h
69              Defines the filename to  use  when  generating  the  C++  client
70              class.   If  this  is  not  provided, the lowercase classname is
71              used.
72
73       --js-client=ClassName
74              Creates a JavaScript client class. No namespaces  are  supported
75              in this option.
76
77       --js-client-file=filename.js
78              Defines  the  filename  to  use  when  generating the JavaScript
79              client class.
80
81       --py-client=ClassName
82              Creates a Python client class. No namespaces  are  supported  in
83              this option.
84
85       --py-client-file=filename.py
86              Defines  the  filename  to use when generating the Python client
87              class.  If this is not  provided,  the  lowercase  classname  is
88              used.
89
90

EXAMPLES

92       Generate  C++  Stubs  for  Server and Client, the classes will be named
93       AbstractStubServer and StubClient:
94
95              jsonrpcstub      spec.json       --cpp-server=AbstractStubServer
96              --cpp-client=StubClient
97
98       Generate JavaScript Client class MyRpcClient into file someclient.js:
99
100              jsonrpcstub           spec.json          --js-client=MyRpcClient
101              --js-client-file=someclient.js
102
103       Generate Python client class StubClient, which will be saved into stub‐
104       client.py
105
106              jsonrpcstub spec.json --py-client=StubClient
107

EXIT STATUS

109       This  command  returns  0  if  no error occurred. In any other case, it
110       returns 1.
111

SEE ALSO

113       https://github.com/cinemast/libjson-rpc-cpp
114

BUGS

116       No known bugs. Please report found bugs as an issue on github  or  send
117       me an email.
118
119
121       Copyright (C) 2011-2017 Peter Spiess-Knafl
122
123       Permission is hereby granted, free of charge, to any person obtaining a
124       copy of this software and associated documentation  files  (the  "Soft‐
125       ware"),  to deal in the Software without restriction, including without
126       limitation the rights to use, copy, modify, merge, publish, distribute,
127       sublicense,  and/or  sell copies of the Software, and to permit persons
128       to whom the Software is furnished to do so, subject  to  the  following
129       conditions:
130
131       The above copyright notice and this permission notice shall be included
132       in all copies or substantial portions of the Software.
133
134       THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
135       OR  IMPLIED,  INCLUDING  BUT  NOT  LIMITED  TO  THE  WARRANTIES OF MER‐
136       CHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN
137       NO  EVENT  SHALL  THE  AUTHORS  OR  COPYRIGHT HOLDERS BE LIABLE FOR ANY
138       CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN  ACTION  OF  CONTRACT,
139       TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFT‐
140       WARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
141
142

AUTHOR

144       Peter Spiess-Knafl (dev@spiessknafl.at)
145
146
147
1481.0.0                            22 April 2017                          man(1)
Impressum