Wednesday, 15 June 2011

json - Passing dictionary from python server to vb.net client -



json - Passing dictionary from python server to vb.net client -

i'm starting out json. have working illustration of passing dictionary python server python client using json. trying pass dictionary python server (which know works) vb.net client. have less experience of network programming in vb.net python. here's client vb.net code:

imports system.text imports newtonsoft.json module module1 private clientsocket new tcpclient private serverstream networkstream private _host string = "raspberrypi" private _port integer = 2001 private my_dict new dictionary sub main() dim received_data string dim instream(100000) byte clientsocket.connect(_host, _port) serverstream = clientsocket.getstream() serverstream.read(instream, 0, cint(clientsocket.receivebuffersize)) received_data = encoding.ascii.getstring(instream) dim output json_result = jsonconvert.deserializeobject(of json_result)(received_data) console.writeline(output.name) console.writeline(output.extension) console.readline() serverstream.close() end sub public class json_result public property name() string public property extension() integer end class end module

i don't error - don't anything. able point me in right direction? want end dictionary object.

python json vb.net dictionary network-programming

No comments:

Post a Comment