Changes between and of Initial VersionVersion 9Ticket #5532
 Timestamp:
 03/26/2013 02:45:21 PM (9 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #5532
 Property Keywords review added
 Property Owner teratorn deleted

Property
Branch
changed from
to
branches/ampjsonspec55322

Property
Author
changed from
to
teratorn

Ticket #5532 – Description
initial v9 5 5 An example of the proposed format: 6 6 {{{ 7 {"commands" : [{"name" : "Sum", 8 "arguments" : [["a", "Integer"], 9 ["b", "Integer"]], 10 "responses" : [["total", "Integer"]] 7 {"commands" : { 8 "Sum" : { 9 "arguments" : [["a", "Integer"], 10 ["b", "Integer"]], 11 "response" : [["total", "Integer"]] 12 }, 13 14 "Divide" : { 15 "arguments" : [["numerator", "Float"], 16 ["denominator", "Float"]], 17 "response" : [["result", "Float"]], 18 19 "errors" : [["ZERO_DIVISION", "ZeroDivisionError"]] 20 }, 21 22 "SumList" : { 23 "arguments" : [["args", {"type" : "ListOf", "of" : "Integer"}], 24 ["basevalue", {"type" : "Integer", 25 "optional" : true}] 26 ], 27 "response" : [["total", "Integer"]] 11 28 }, 12 29 13 {"name" : "Divide", 14 "arguments" : [["numerator", "Float"], 15 ["denominator", "Float"]], 16 "responses" : [["result", "Float"]], 17 18 "errors" : [["ZERO_DIVISION", "ZeroDivisionError"]] 19 }, 20 21 {"name" : "SumList", 22 "arguments" : [["args", {"type" : "ListOf", "of" : "Integer"}], 23 ["basevalue", {"type" : "Integer", "optional" : true}] 24 ], 25 "responses" : [["total", "Integer"]] 26 }, 27 28 {"name" : "SumPairs", 29 "arguments" : [["args", {"type" : "TupleList", "of" : ["Integer", "Integer"]}]], 30 "responses" : [["total", "Integer"]] 31 } 32 ] 30 "SumPairs" : { 31 "arguments" : [["args", {"type" : "TupleList", 32 "of" : ["Integer", "Integer"]}]], 33 "response" : [["total", "Integer"]] 34 } 35 } 33 36 } 34 35 37 }}} 36 38 … … 40 42 class Sum(amp.Command): 41 43 arguments = [['a', amp.Integer()], ['b', amp.Integer()]] 42 response s= [['total', amp.Integer()]]44 response = [['total', amp.Integer()]] 43 45 44 46 class Divide(amp.Command): 45 47 arguments = [['numerator', amp.Float()], 46 48 ['denominator', amp.Float()]] 47 response s= [['result', amp.Float()]]49 response = [['result', amp.Float()]] 48 50 errors = [['ZERO_DIVISION', ZeroDivisionError]] 49 51 … … 52 54 ['basevalue', amp.Integer(optional=True)]] 53 55 54 response s= [['total', amp.Integer()]]56 response = [['total', amp.Integer()]] 55 57 56 58 class SumPairs(amp.Command): 57 59 arguments = [['args', TupleList(amp.Integer(), amp.Integer())]] 58 response s= [['total', amp.Integer()]]60 response = [['total', amp.Integer()]] 59 61 60 62 }}}