(Migrated) sio question

(This message has been automatically imported from the retired mailing list)

Hello,

Can this structure be used as a SIO, I’ve tried with no success?

{"domains": [
        {"domain”:"aguacate.com”},
    {"domain”:”chango.com”},
        {"domain”:"cola.com”},
    ],
 "extra": [{"scan_id": 1, "service":"dim"}],
 "callback": "None"
}

I’ve found how to accept lists and Dicts using SIO, in the test cases: local/zato-server/test/zato/server/live/zato_test_sio_live.py

class _TestBase(Service):

test_data = bunchify({
    'should_as_is': 'True',
    'is_boolean': 'True',
    'should_boolean': 'False',
    'csv1': '1,2,3,4',
    'dict': {'a':'b', 'c':'d'},
    'float': '2.3',
    'integer': '190',
    'integer2': '0',
    'list': ['1', '2', '3'],
    'list_of_dicts': [{'1':'11', '2':'22'}, {'3':'33'}, {'4':'44', '5':'55', '3':'33', '2':'22', '1':'11'}],
    'unicode1': 'zzzä',
    'unicode2': 'zä',
    'utc': '2012-01-12T03:12:19+00:00'
})

class SimpleIO:
    input_required = (AsIs('should_as_is'), 'is_boolean', 'should_boolean', CSV('csv1'), Dict('dict'), Float('float'),
        Integer('integer'), Integer('integer2'), List('list'), ListOfDicts('list_of_dicts'), Unicode('unicode1'),
        Unicode('unicode2'), UTC('utc'))

    output_required = (AsIs('should_as_is'), 'is_boolean', 'should_boolean', CSV('csv1'), CSV('csv2'), CSV('csv3'),
        Dict('dict'), Float('float'), Integer('integer'), Integer('integer2'), List('list'), ListOfDicts('list_of_dicts'),
        Unicode('unicode1'), Unicode('unicode2'), UTC('utc’))

On Jul 10, 2015, at 4:21 PM, Ivan Villareal ivaano@gmail.com wrote:

Hello,

Can this structure be used as a SIO, I’ve tried with no success?

{“domains”: [
{"domain”:"aguacate.com”},
{"domain”:”chango.com”},
{"domain”:"cola.com”},
],
“extra”: [{“scan_id”: 1, “service”:“dim”}],
“callback”: “None”
}